-
Notifications
You must be signed in to change notification settings - Fork 13
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
Changed propagation of failure termination #373
Open
LanderOtto
wants to merge
13
commits into
master
Choose a base branch
from
fix/fails
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #373 +/- ##
==========================================
+ Coverage 70.12% 70.24% +0.12%
==========================================
Files 84 84
Lines 10611 10648 +37
Branches 2514 2532 +18
==========================================
+ Hits 7441 7480 +39
+ Misses 2714 2707 -7
- Partials 456 461 +5 ☔ View full report in Codecov by Sentry. |
… a new method called `_get_step_status`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit changes how StreamFlow propagates the failure termination into the workflow steps.
Before this commit
The steps propagate SKIPPED status because the ports are empties.
New
TerminationToken
valueWe use the 'TerminationToken' value, which was not used, to propagate the 'Step' exit status. This way, the following steps know if they can continue the execution or terminate immediately.
The possible step exit statuses are:
CANCELLED
,FAILED
,COMPLETED
andSKIPPED
.The step takes the exit status based on the exit status of all its jobs, combining them.
In general, the job statuses are unified.
FAILED
andCANCELLED
absorbs all the other statuses, insteadCOMPLETED
absorbsSKIPPED
.Some examples:
COMPLETED
,COMPLETED
,COMPLETED
,COMPLETED
] =>COMPLETED
COMPLETED
,FAILED
,COMPLETED
,CANCELLED
] =>FAILED
CANCELLED
,FAILED
,COMPLETED
,COMPLETED
] =>CANCELLED
COMPLETED
,SKIPPED
,COMPLETED
,SKIPPED
] =>COMPLETED
SKIPPED
,SKIPPED
,SKIPPED
,SKIPPED
] =>SKIPPED
Forced Termination
First, a regression about how StreamFlow works. StreamFlow executes its entites as individual tasks, using the
asyncio.Task
corountine. So each manager and eachStep
is a task.When a step fails, as said before, the
TerminationToken
is propagated to next steps and they terminate withFAILED
status too. However, there are some StreamFlow entities which not receive theTerminationToken
.These entities are cancelled by the StreamFlow executor:
Step
instances. In the case of thescatter
feature, ajob
of theExecuteStep
can fail, so the other jobs are cancelled. TheExecuteStep
propagates theTerminationToken
withFAILED
value. However, before theExecuteStep
can be other aliveStep
objects asTransferStep
,ScheduleStep
. They do not receive theTerminationToken
withFAILED
value, so they keep their activities until the StreamFlowexecutor
will cancel all theasyncio.Task
included the task in charge of theseStep
runs.Scheduler
. While theTerminationToken
withFAILED
value is propagated, theScheduler
continues its work. Meanwhile, the deployments are undeployed and can happens that theScheduler
was communicating with the location and its communication is interrupted.