Skip to content

fix: correct cleanPodPolicy default in generated docs - #827

Merged
google-oss-prow[bot] merged 1 commit into
kubeflow:masterfrom
immanuwell:fix/cleanpodpolicy-default-docs
Jul 9, 2026
Merged

fix: correct cleanPodPolicy default in generated docs#827
google-oss-prow[bot] merged 1 commit into
kubeflow:masterfrom
immanuwell:fix/cleanpodpolicy-default-docs

Conversation

@immanuwell

Copy link
Copy Markdown
Member

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
google-oss-prow Bot requested review from carmark and gaocegege July 4, 2026 10:21
@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

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix/cleanpodpolicy-default-docs branch from f9b3b2b to e06e925 Compare July 8, 2026 16:47
@immanuwell

Copy link
Copy Markdown
Member Author

@tenzen-y done, regenerated it, PTAL

@tenzen-y tenzen-y left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!
/lgtm
/approve

@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

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

The pull request process is described 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 merged commit cb73077 into kubeflow:master Jul 9, 2026
10 checks passed
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.

2 participants