Skip to content

fix: correct cleanPodPolicy default in generated docs#827

Open
immanuwell wants to merge 1 commit into
kubeflow:masterfrom
immanuwell:fix/cleanpodpolicy-default-docs
Open

fix: correct cleanPodPolicy default in generated docs#827
immanuwell wants to merge 1 commit into
kubeflow:masterfrom
immanuwell:fix/cleanpodpolicy-default-docs

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Problem

SetDefaults_MPIJob defaults omitted cleanPodPolicy to None, but the shipped CRD, deploy yaml, swagger, and python sdk docs say Running.
That is a pretty easy footgun in the wild.

Fix

Update the source comment and regenerate the published API surfaces so they all say Defaults to None.

Repro

  1. Open pkg/apis/kubeflow/v2beta1/default.go and see policy.CleanPodPolicy = ptr.To(CleanPodPolicyNone).
  2. Open the pre-fix generated docs, for example deploy/v2beta1/mpi-operator.yaml, and see Default to Running.
  3. Omit spec.runPolicy.cleanPodPolicy in an MPIJob. The real default is None, so the docs were off.

Validation

go test ./pkg/apis/kubeflow/v2beta1 ./pkg/apis/kubeflow/validation ./pkg/controller

@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 tenzen-y 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 google-oss-prow Bot requested review from carmark and gaocegege July 4, 2026 10:21
Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell immanuwell force-pushed the fix/cleanpodpolicy-default-docs branch from bef611e to f9b3b2b Compare July 4, 2026 10:22
@tenzen-y

tenzen-y commented Jul 7, 2026

Copy link
Copy Markdown
Member

@immanuwell Thank you for your contribution, it seems that generated codes are out dated. Can you verify and fix that?

https://github.com/kubeflow/mpi-operator/actions/runs/28703199713/job/85237964347?pr=827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants