-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cft] Exit 1 if purge error #137733
[cft] Exit 1 if purge error #137733
Conversation
This triggers a job failure if the purge-cloud-deployments script encounters an error. I'm attempting to debug why an instance was stuck online and hoping this will make future issues easier to spot.
Pinging @elastic/kibana-operations (Team:Operations) |
@@ -45,6 +45,7 @@ for (const deployment of prDeployments) { | |||
} catch (ex) { | |||
console.error(ex.toString()); | |||
// deploymentsToPurge.push(deployment); // TODO should we delete on error? | |||
process.exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably keep track of whether or not an error occurred, and then exit at the very end of the script, right? Otherwise, an error on the first deployment would keep all of the other ones from getting purged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed 6b801d5
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
This triggers a job failure if the purge-cloud-deployments script
encounters an error. I'm attempting to debug why an instance was stuck
online and hoping this will make future issues easier to spot.