-
Notifications
You must be signed in to change notification settings - Fork 53
add composable PluginCleanupPolicy (flyteorg/flyte#1345) #203
Conversation
Thank you for opening this pull request! 🙌 |
20d76da
to
e3c19e5
Compare
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
==========================================
+ Coverage 60.68% 61.00% +0.32%
==========================================
Files 135 138 +3
Lines 8313 8538 +225
==========================================
+ Hits 5045 5209 +164
- Misses 2806 2851 +45
- Partials 462 478 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! thank you for adapting the design. just a couple of minor comments and we can merge it today!
Just to speed up the next review, there seems to be some lint errors and DCO isn't happy... mind fixing those too? |
Signed-off-by: Claire McGinty <[email protected]>
Signed-off-by: Claire McGinty <[email protected]>
Signed-off-by: Claire McGinty <[email protected]>
Co-authored-by: Haytham Abuelfutuh <[email protected]> Signed-off-by: Claire McGinty <[email protected]>
Signed-off-by: Claire McGinty <[email protected]>
Signed-off-by: Claire McGinty <[email protected]>
Co-authored-by: Haytham Abuelfutuh <[email protected]> Signed-off-by: Claire McGinty <[email protected]>
8c89b10
to
81abcd8
Compare
Signed-off-by: Claire McGinty <[email protected]>
Congrats on merging your first pull request! 🎉 |
* use PluginCleanupPolicy if it exists Signed-off-by: Claire McGinty <[email protected]> * add unit test Signed-off-by: Claire McGinty <[email protected]> * cleanup test code Signed-off-by: Claire McGinty <[email protected]> * assert OnAbort is not attempted by default Signed-off-by: Claire McGinty <[email protected]> * update plugin override interface Signed-off-by: Claire McGinty <[email protected]> * lint Signed-off-by: Claire McGinty <[email protected]> * Apply PR suggestions Signed-off-by: Claire McGinty <[email protected]> * update flyteplugins lib Signed-off-by: Claire McGinty <[email protected]>
* use PluginCleanupPolicy if it exists Signed-off-by: Claire McGinty <[email protected]> * add unit test Signed-off-by: Claire McGinty <[email protected]> * cleanup test code Signed-off-by: Claire McGinty <[email protected]> * assert OnAbort is not attempted by default Signed-off-by: Claire McGinty <[email protected]> * update plugin override interface Signed-off-by: Claire McGinty <[email protected]> * lint Signed-off-by: Claire McGinty <[email protected]> * Apply PR suggestions Signed-off-by: Claire McGinty <[email protected]> * update flyteplugins lib Signed-off-by: Claire McGinty <[email protected]>
* add composable PluginCleanupPolicy Signed-off-by: Claire McGinty <[email protected]> * fix generated mocks Signed-off-by: Claire McGinty <[email protected]> * use PluginAbortOverride in PluginProperties Signed-off-by: Claire McGinty <[email protected]> * Update go/tasks/pluginmachinery/k8s/plugin.go Co-authored-by: Haytham Abuelfutuh <[email protected]> Signed-off-by: Claire McGinty <[email protected]> * add custom constructors for AbortBehavior Signed-off-by: Claire McGinty <[email protected]> * Apply Ketan's suggestions Signed-off-by: Claire McGinty <[email protected]> * Apply suggestions from code review Co-authored-by: Haytham Abuelfutuh <[email protected]> Signed-off-by: Claire McGinty <[email protected]> * lint/goimports Signed-off-by: Claire McGinty <[email protected]> Co-authored-by: Haytham Abuelfutuh <[email protected]>
Read then delete this section
- Make sure to use a concise title for the pull-request.
- Use #patch, #minor or #major in the pull-request title to bump the corresponding version. Otherwise, the patch version
will be bumped. More details
TL;DR
Adds an optional interface that k8s plugins can implement,
PluginCleanupPolicy
, as an alternative to flytepropeller simply deleting the resource.cc @regadas , @EngHabu
Type
Are all requirements met?
Complete description
flyteorg/flyte#1345 Adds an optional interface that k8s plugins can implement,
PluginCleanupPolicy
, as an alternative to flytepropeller simply deleting the resource. The idea is that it would be used in flytepropeller as in this branch, where it checks if the plugin implementsPluginCleanupPolicy
and if so substitutes that action. For our use case we just need theAbort
action override; I know flytepropeller does some cleanup actions in its finalizers also, but we don't need to override that.Note: I'm not sure about what unit tests to add here. My plan was to add specific unit tests to flytepropeller to check that the cleanup policy is being selected when applicable. I've also tested end to end (the proposed changes to flyteplugins, flytepropeller, and my custom plugin) with a local setup on Minikube.
Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
fixes https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/