Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

zulip-puppet-apply: Any resources failing to apply should exit 2.

Alex Vandiver7dc7962c04a3
diff --git a/scripts/zulip-puppet-apply b/scripts/zulip-puppet-apply
index b6238ef8569..a5d38a867a5 100755
--- a/scripts/zulip-puppet-apply
+++ b/scripts/zulip-puppet-apply
@@ -82,7 +82,10 @@ def noop_would_change(puppet_cmd: List[str]) -> bool:
with open(lastrun_file.name) as lastrun:
lastrun_data = yaml.safe_load(lastrun)
- return lastrun_data.get("resources", {}).get("out_of_sync", 0) != 0
+ resources = lastrun_data.get("resources", {})
+ if resources.get("failed", 0) != 0:
+ sys.exit(2)
+ return resources.get("out_of_sync", 0) != 0
except subprocess.CalledProcessError:
sys.exit(2)
finally: