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

Abort-after-seconds #18

Closed
siemensikkema opened this issue Sep 28, 2020 · 4 comments · Fixed by #19
Closed

Abort-after-seconds #18

siemensikkema opened this issue Sep 28, 2020 · 4 comments · Fixed by #19

Comments

@siemensikkema
Copy link

In addition to the continue-after-seconds I could see a good use-case for an abort-after-seconds option such that the waiting step doesn't exceed some limit. You could set a timeout-minutes on the whole job but then you have to take into account how long you expect a normal run to take. Am I missing something? Can this be done another way already?

@GMNGeoffrey
Copy link
Contributor

This seems pretty straightforward to implement. @softprops would you accept a PR for this feature?

@softprops
Copy link
Owner

That sounds reasonable. Just to confirm the difference would be failing the job rather than pressing on? That makes sense to me.

@GMNGeoffrey
Copy link
Contributor

Yup, exactly. I figure it can throw an error in the waiter which will then propagate up to main

GMNGeoffrey added a commit to GMNGeoffrey/turnstyle that referenced this issue Oct 3, 2020
This has similar behavior to continue-after-seconds, but instead of
continuing, it aborts the step with a failure.

Resolves softprops#18
@jbasila-orca
Copy link

Another use case is when you would like to send some sort of notification (a custom notification using if: failure() when the job didn't run.

Using timeout-minutes will cancel the whole job and thus no notification will be sent, but if the timeout-minutes is set properly, and only the abort-after-seconds will trigger the failure, then the notification step will be executed and the user will be notified that the job was canceled.

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

Successfully merging a pull request may close this issue.

4 participants