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

Add on_error hook in pipeline definition to be executed when a task errored #15

Open
hlubek opened this issue Aug 4, 2021 · 3 comments

Comments

@hlubek
Copy link
Member

hlubek commented Aug 4, 2021

Scenario: A task like a database migration needs a rollback if it errored

@hlubek hlubek added this to the First supported version milestone Aug 4, 2021
@Benjamin-K
Copy link

on_error could also be used, if a job is cancelled. Or do you think, this should be treated differently?

@hlubek
Copy link
Member Author

hlubek commented Sep 15, 2022

@Benjamin-K If the job was already started - and then canceled - it would make sense. Question is, if the name on_error is suitable for both the error case and rollback on cancellation and the behaviour could be expected on cancellation.

@Benjamin-K
Copy link

@hlubek What if we add some variables to the on_error hook? Sth. like PRUNNER_PIPELINE_STARTED=1, PRUNNER_FINISHED_TASKS=task1,task2,task3 (or as a list) so one could access them to decide, whether to do some rollback or not?

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

No branches or pull requests

2 participants