Skip to content

Fix: Handle missing PipelineVersion in Kubernetes API mode#13222

Open
Goku2099 wants to merge 2 commits intokubeflow:masterfrom
Goku2099:fix/pipeline-version-not-found
Open

Fix: Handle missing PipelineVersion in Kubernetes API mode#13222
Goku2099 wants to merge 2 commits intokubeflow:masterfrom
Goku2099:fix/pipeline-version-not-found

Conversation

@Goku2099
Copy link
Copy Markdown

@Goku2099 Goku2099 commented Apr 6, 2026

Fixes an issue where GetPipelineV1 fails if a PipelineVersion is not found.

The current implementation assumes that a "latest" PipelineVersion always exists and returns an error if it is missing ("PipelineVersion: Latest not found"). This causes the Kubeflow UI to fail when accessing pipelines created in Kubernetes API mode.

This PR updates the behavior to:

  • Gracefully handle missing PipelineVersion
  • Return the pipeline without failing when the version is not found
  • Preserve existing behavior for other error cases

This ensures compatibility between v1beta1 API expectations and v2beta1 CRD-based pipelines.

Fixes #13216

Copilot AI review requested due to automatic review settings April 6, 2026 17:36
@google-oss-prow
Copy link
Copy Markdown

[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 hbelmiro for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

@google-oss-prow
Copy link
Copy Markdown

Hi @Goku2099. 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.

Details

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to fix an issue where the Kubeflow Pipelines backend fails when accessing pipelines in Kubernetes API (CRD) mode when a PipelineVersion is not found. The fix modifies GetPipelineV1 to gracefully handle missing PipelineVersion by checking if the error message contains "not found", then setting pipelineVersion to nil and continuing instead of returning an error.

Changes:

  • Modified GetPipelineV1 to catch "not found" errors from getLatestPipelineVersion and allow nil pipelineVersion instead of failing
  • Continues to return an error for other error cases

Comment thread backend/src/apiserver/server/pipeline_server.go
Comment thread backend/src/apiserver/server/pipeline_server.go
Comment thread backend/src/apiserver/server/pipeline_server.go
Goku2099 added 2 commits April 7, 2026 20:36
Signed-off-by: Sameer_yadav <159073326+Goku2099@users.noreply.github.com>
Signed-off-by: Sameer_yadav <159073326+Goku2099@users.noreply.github.com>
@Goku2099 Goku2099 force-pushed the fix/pipeline-version-not-found branch from c71a8cd to bdbd5ed Compare April 7, 2026 15:06
@google-oss-prow google-oss-prow bot added size/S and removed size/XS labels Apr 7, 2026
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.

Kubeflow Pipelines (Kubernetes API mode) error: Failed to get a pipeline (v1beta1) due to error fetching the latest pipeline version.

2 participants