Skip to content
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

Need Notification/Stopping Mechanism for CI Errors #96

Open
yyna opened this issue Oct 7, 2024 · 2 comments
Open

Need Notification/Stopping Mechanism for CI Errors #96

yyna opened this issue Oct 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@yyna
Copy link

yyna commented Oct 7, 2024

Hello,

I’m facing an issue with error handling in the CI process. Currently, when an error occurs, I would like to receive notifications or halt the deployment process. However, it seems that all errors are being thrown and then caught, which prevents the exit code from being returned properly.

Could you please advise on how to ensure that the exit code is received in order to trigger notifications or stop the deployment when an error occurs?

@bakyeono
Copy link

bakyeono commented Oct 7, 2024

Does the throw-error? option make sense here?

(defn migrate
  "Run migration on a db."
  [{:keys [... throw-error?]
    :or {...
         throw-error? false}}]

@abogoyavlensky abogoyavlensky added the enhancement New feature or request label Oct 7, 2024
@abogoyavlensky
Copy link
Owner

@yyna Hi, thank you so much for the issue!

Could you please advise on how to ensure that the exit code is received in order to trigger notifications or stop the deployment when an error occurs?

That’s a great point. Currently, all errors are caught, and the tool prints a message without a proper exit code. I think this could be improved in the context of this issue.

@bakyeono Hi, the throw-error? option makes sense, but I would consider extending the tool’s config as a last resort. First, I would try to properly return the exit code when an error occurs always, along with a text message, instead of ignoring it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants