Skip to content

Conversation

milinddethe15
Copy link
Member

@milinddethe15 milinddethe15 commented Mar 12, 2025

Description of your changes:
fixes #11665
It deletes all the versions of pipeline before deleting the pipeline and shows a warning message to user.

Checklist:

Demo:

2025-03-13.00-09-26.mp4

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
Copy link

Hi @milinddethe15. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@google-oss-prow google-oss-prow bot requested review from HumairAK and zijianjoy March 12, 2025 18:26
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zijianjoy for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
@milinddethe15 milinddethe15 changed the title fix(frontend): handle versions when deleting the pipeline fix(ui): Delete the pipeline with multiple versions. Fixes #11665 Mar 12, 2025
@milinddethe15 milinddethe15 changed the title fix(ui): Delete the pipeline with multiple versions. Fixes #11665 fix(ui): Delete the pipeline having multiple versions. Fixes #11665 Mar 12, 2025
@juliusvonkohout
Copy link
Member

/ok-to-test

@hbelmiro

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
@milinddethe15
Copy link
Member Author

/retest

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
@milinddethe15
Copy link
Member Author

/retest

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
@milinddethe15
Copy link
Member Author

/retest

@juliusvonkohout
Copy link
Member

For me it is a
/lgtm

since it is a common bug users encounter.

But @hbelmiro and @HumairAK should approve the coding style and tests.

/hold

@google-oss-prow google-oss-prow bot added the lgtm label Mar 16, 2025
@milinddethe15 milinddethe15 changed the title fix(ui): Delete the pipeline having multiple versions. Fixes #11665 fix(ui): Delete the pipeline along with its all versions. Fixes #11665 Mar 16, 2025
@juliusvonkohout juliusvonkohout added this to the KFP 2.5.0 milestone Mar 17, 2025
Copy link
Contributor

@hbelmiro hbelmiro left a comment

Choose a reason for hiding this comment

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

@milinddethe15 The frontend is supposed to contain only UI logic.
Removing pipeline versions when a pipeline has versions is a business logic, which should be handled by the backend. Like:
Frontend: Sends deletePipeline
Backend: Checks if that pipeline has more than one pipeline version. If so, returns an error
Frontend: Handles the error by asking the user if the pipeline versions should also be deleted. If so, send to the backend a deletePipelineAndVersions
Backend: Iterates over all versions deleting them and then deletes the pipeline

@hbelmiro
Copy link
Contributor

/lgtm cancel

@milinddethe15
Copy link
Member Author

Got it.
So, to handle this case in server, we need to create a new API, like deletePipelineAndVersions , to delete pipeline and its versions. Since deletePipeline gives error if the pipeline has pipeline versions:

* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(pipeline_id: string, options: any = {}): FetchArgs {

PS: Here, I wanted to ultize the existing APIs to do the job without a new API.

@hbelmiro
Copy link
Contributor

Got it. So, to handle this case in server, we need to create a new API, like deletePipelineAndVersions , to delete pipeline and its versions. Since deletePipeline gives error if the pipeline has pipeline versions:

* @summary Deletes an empty pipeline by ID. Returns error if the pipeline has pipeline versions.
* @param {string} pipeline_id Required input. ID of the pipeline to be deleted.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deletePipeline(pipeline_id: string, options: any = {}): FetchArgs {

PS: Here, I wanted to ultize the existing APIs to do the job without a new API.

IMO we should create the new API or add a new parameter (default false) to the existing one that tells whether the deletion should cascade.
@HumairAK @mprahl thoughts?

@HumairAK HumairAK modified the milestones: KFP 2.5.0, KFP 2.6.0 Apr 8, 2025
@milinddethe15
Copy link
Member Author

IMO we should create the new API or add a new parameter (default false) to the existing one that tells whether the deletion should cascade.

I am working on to add new parameter. but I am not sure whether to include the changes in v1beta1 APIs as well? Do we still support the v1?

@hbelmiro @HumairAK

@milinddethe15
Copy link
Member Author

Hm.. Frontend is using v1beta1
is v2beta1 still in development?

@juliusvonkohout
Copy link
Member

IMO we should create the new API or add a new parameter (default false) to the existing one that tells whether the deletion should cascade.

I am working on to add new parameter. but I am not sure whether to include the changes in v1beta1 APIs as well? Do we still support the v1?

@hbelmiro @HumairAK

Yes, right now v1 pipelines are still supported. Probably until end of 2026 and until we find a solution for ml-metadata we need v1.

@HumairAK
Copy link
Collaborator

hey @milinddethe15 - just wondering where are with this, are you still able to continue work on this address the above changes? if so let us know and feel free to ping me on slack to help get this in! appreciate your effort here, thanks!

@milinddethe15
Copy link
Member Author

I remember working on apiserver (grpc backend), which gave me server timeouts for /delete-pipeline endpoint. I was sure I made all right code changes but wasn't able to debug 🥲. Will see if I still have the code and ping you @HumairAK, if needed.

@milinddethe15
Copy link
Member Author

/close
in favour of #12019

Copy link

@milinddethe15: Closed this PR.

In response to this:

/close
in favour of #12019

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@google-oss-prow google-oss-prow bot closed this Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Delete a pipeline and all its pipeline versions in one single step
4 participants