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

[Plugin] Support custom resource cleanup policy in Plugin interface #1345

Closed
2 of 7 tasks
clairemcginty opened this issue Aug 16, 2021 · 1 comment
Closed
2 of 7 tasks
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@clairemcginty
Copy link
Contributor

Why would this plugin be helpful to the Flyte community
I'd like to propose adding a 5th method to the Plugin interface allowing users to customize how they want their resource to be cleaned up at the conclusion of the task. By default in Flytepropeller the task is cleaned up just by deleting the k8s resource; however for our use case we’d like to only delete selective resources and patch others. I put up a small branch [1] with an idea of what this could look like in plugins.go; and FlytePropeller could just defer to that method in its Abort method. Unfortunately because of Go’s inheritance rules it would be a breaking change for all plugin implementations. Per discussion with @EngHabu in #feature-discussions in the Flyte Slack instance, this could possibly be implemented as a "PluginV2" interface that users can choose whether to implement.

Type of Plugin

  • Python/Java interface only plugin
  • Web Service (e.g. AWS Sagemaker, GCP DataFlow, Qubole etc...)
  • Kubernetes Operator (e.g. TfOperator, SparkOperator, FlinkK8sOperator, etc...)
  • Customized Plugin using native kubernetes constructs
  • Other

Can you help us with the implementation?

  • Yes
  • No
@clairemcginty clairemcginty added the untriaged This issues has not yet been looked at by the Maintainers label Aug 16, 2021
@welcome
Copy link

welcome bot commented Aug 16, 2021

Thank you for opening your first issue here! 🛠

@EngHabu EngHabu added this to the 0.17.0 milestone Aug 17, 2021
@EngHabu EngHabu added enhancement New feature or request and removed untriaged This issues has not yet been looked at by the Maintainers labels Aug 17, 2021
@EngHabu EngHabu modified the milestones: 0.17.0, 0.18.0 Sep 2, 2021
EngHabu added a commit to flyteorg/flyteplugins that referenced this issue Sep 9, 2021
* 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]>
pingsutw pushed a commit to pingsutw/flyte-monorepo that referenced this issue Apr 4, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants