Skip to content

fix(controller): keep scheduled run names within DNS label limit - #3121

Open
immanuwell wants to merge 1 commit into
kubeflow:masterfrom
immanuwell:fix/scheduled-app-run-name-length
Open

immanuwell wants to merge 1 commit into
kubeflow:masterfrom
immanuwell:fix/scheduled-app-run-name-length

Conversation

@immanuwell

@immanuwell immanuwell commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Purpose of this PR

A 55 character ScheduledSparkApplication name is accepted, but even the shortest minutes suffix creates a 64 character run name.
The child webhook rejects it, so the schedule never starts.
so this is still reachable after #2827

Related to #2602.

Proposed changes:

  • Reuse the existing hash and truncation helper for scheduled run names
  • Keep names unchanged when they already fit
  • Test the real parent admission and child creation path, plus collision safety

Reproduction

  1. Create a schedule with metadata.name set to 55 lowercase letters
  2. Set timestamp precision to minutes
  3. Wait for a run. The parent exists, but child creation fails with must be no more than 63 characters

Change Category

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Rationale

Only names that already fail are changed. Working names stay byte for byte the same, so yeah this is pretty contained.

Checklist

  • I have conducted a self-review of my own code.
  • Documentation is not needed for this behavior fix.
  • I have added tests that prove my changes are effective.
  • Existing unit tests pass locally with my changes.

Additional Notes

go test ./..., go vet ./..., and make go-lint pass locally.

@google-oss-prow
google-oss-prow Bot requested review from ImpSy and RobuRishabh August 28, 2026 10:37
@google-oss-prow

Copy link
Copy Markdown
Contributor

[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 vara-bonthu 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

@github-actions

Copy link
Copy Markdown

🎉 Welcome to the Kubeflow Spark Operator! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

@tariq-hasan tariq-hasan 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.

Hi @immanuwell! I have added a few comments.

Comment thread pkg/util/sparkapplication.go Resolved
@tariq-hasan

Copy link
Copy Markdown
Member

/assign

@tariq-hasan

Copy link
Copy Markdown
Member

@immanuwell Please address the review comments so we can move forward with this PR.

Signed-off-by: immanuwell <pchpr.00@list.ru>
@immanuwell
immanuwell force-pushed the fix/scheduled-app-run-name-length branch from 1285b98 to 2e2fe94 Compare October 22, 2026 05:54
@google-oss-prow google-oss-prow Bot added size/L and removed size/M labels Oct 22, 2026
@immanuwell

Copy link
Copy Markdown
Member Author

@tariq-hasan everything is addressed, please take a look

@tariq-hasan tariq-hasan 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.

Thanks @immanuwell!
/lgtm

@google-oss-prow google-oss-prow Bot added the lgtm label Oct 29, 2026
@tariq-hasan

Copy link
Copy Markdown
Member

/cc @nabuskey

@google-oss-prow
google-oss-prow Bot requested a review from nabuskey October 29, 2026 06:23

This branch has not been deployed

No deployments
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