Skip to content

Conversation

@adamruzicka
Copy link
Contributor

Up until now, Dynflow only had support for clean cancellation. Upon cancellation
a cancel event was sent to all cancellable suspended and running steps and it
was the action's responsibility to cancel itself. However, there were actions
which just weren't cancellable at all.

This commit adds support for halting execution plans. The actions are completely
unaware of this, on halt dynflow just destroys its internal state about a given
execution plan and turns it to stopped state. It does not remove running steps
from workers as we currently don't have any real means of doing so. Any pending
events will be rejected. In other words, halting an execution plan ensure it
will not run any further.

adamruzicka added a commit to adamruzicka/foreman-tasks that referenced this pull request Jan 28, 2022
@adamruzicka adamruzicka added this to the v1.7.0 milestone Feb 8, 2022
@ezr-ondrej
Copy link
Contributor

This sounds like a nice feature, but I do not feel comfortable enough to ellaborate on the consequences here...

adamruzicka added a commit to adamruzicka/foreman-tasks that referenced this pull request Jul 28, 2022
adamruzicka added a commit to adamruzicka/foreman-tasks that referenced this pull request Aug 19, 2022
adamruzicka added a commit to adamruzicka/foreman-tasks that referenced this pull request Apr 4, 2024
adamruzicka and others added 2 commits May 22, 2024 11:48
Up until now, Dynflow only had support for clean cancellation. Upon cancellation
a cancel event was sent to all cancellable suspended and running steps and it
was the action's responsibility to cancel itself. However, there were actions
which just weren't cancellable at all.

This commit adds support for halting execution plans. The actions are completely
unaware of this, on halt dynflow just destroys its internal state about a given
execution plan and turns it to stopped state. It does not remove running steps
from workers as we currently don't have any real means of doing so. Any pending
events will be rejected. In other words, halting an execution plan ensure it
will not run any further.
It is the caller's responsibility to not try to halt an already stopped
execution plan.
@ezr-ondrej
Copy link
Contributor

@adamruzicka if you'd like me to give it another try, I can do a review here. I've improved my code reading skills and I've learned YOLO, so I'd be happy to merge after a proper review

@adamruzicka
Copy link
Contributor Author

I was about to merge this myself in the upcoming weeks, but I'll never say no to another pair of eyes on a pr so if you could, I'd be grateful for that

Copy link
Contributor

@ezr-ondrej ezr-ondrej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty well designed :)
There is one too many halted flags to my taste and I'm unsure if the clean-up is all correct, but looks like it! :)
+1 from me FWIW.

@adamruzicka adamruzicka merged commit 22522dd into Dynflow:master Jun 11, 2024
@adamruzicka adamruzicka deleted the halt branch June 11, 2024 08:29
@adamruzicka
Copy link
Contributor Author

Thank you @ezr-ondrej !

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 this pull request may close these issues.

2 participants