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

using Abort phase and cleaning up best-effort #4600

Merged

Conversation

hamersaw
Copy link
Contributor

Updating to:

  • enable use of the Abort phase directly in ExternalResourceInfo rather than a bool flag
  • Remove failing w/ cleanup, because we only need to attempt abort once. While the workflow is running this happens with the AbortSubTask ArrayNodePhase and otherwise this is attempted during Abort
  • Removed eventing as Abort during finalize. This function is used to handle finalizer cleanup and resource deletion (if requested), so tasks should not be phase transitioned.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 14, 2023
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ccd31ce) 58.95% compared to head (70cc620) 59.03%.

Files Patch % Lines
...propeller/pkg/controller/nodes/task/transformer.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           bug/abort-map-task-subtasks    #4600      +/-   ##
===============================================================
+ Coverage                        58.95%   59.03%   +0.08%     
===============================================================
  Files                              547      484      -63     
  Lines                            42293    41599     -694     
===============================================================
- Hits                             24934    24560     -374     
- Misses                           15062    15083      +21     
+ Partials                          2297     1956     -341     
Flag Coverage Δ
unittests 59.03% <0.00%> (+2.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pvditt pvditt left a comment

Choose a reason for hiding this comment

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

Thanks for putting this up. Introducing a new phase cleans up a lot. Didn't think of not going down the Abort handler path during failure, but since we introduced aborting while running, I agree that we shouldn't attempt aborting again.

I'll need to make some changes to unit tests, but can do that on the other branch.

@pvditt pvditt merged commit 08056f3 into bug/abort-map-task-subtasks Dec 14, 2023
39 of 42 checks passed
@pvditt pvditt deleted the bug/abort-map-task-subtasks-iterate branch December 14, 2023 17:29
hamersaw added a commit that referenced this pull request Dec 15, 2023
* add cleanup on failure for array task permanent failures

Signed-off-by: Paul Dittamo <[email protected]>

* persist subtask aborts to admin

Signed-off-by: Paul Dittamo <[email protected]>

* add isAbortedSubtask field to externalResources

Signed-off-by: Paul Dittamo <[email protected]>

* lint

Signed-off-by: Paul Dittamo <[email protected]>

* add tests for terminal updates

Signed-off-by: Paul Dittamo <[email protected]>

* add unit tests for terminatesubtasks

Signed-off-by: Paul Dittamo <[email protected]>

* lint + update unit test

Signed-off-by: Paul Dittamo <[email protected]>

* delete comment

Signed-off-by: Paul Dittamo <[email protected]>

* clean up unit test

Signed-off-by: Paul Dittamo <[email protected]>

* delete comments

Signed-off-by: Paul Dittamo <[email protected]>

* set correct error message

Signed-off-by: Paul Dittamo <[email protected]>

* add new array plugin abort phase

Signed-off-by: Paul Dittamo <[email protected]>

* update awsbatch array unit test

Signed-off-by: Paul Dittamo <[email protected]>

* using Abort phase and cleaning up best-effort (#4600)

* using Abort phase and cleaning up best-effort

Signed-off-by: Daniel Rammer <[email protected]>

* removed phase updates on Finalize

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>

* update unit test

Signed-off-by: Paul Dittamo <[email protected]>

* handling PhaseAbortSubTasks in awsbatch plugin

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Paul Dittamo <[email protected]>
Signed-off-by: Daniel Rammer <[email protected]>
Co-authored-by: Paul Dittamo <[email protected]>
Co-authored-by: Dan Rammer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants