Skip to content

[release-0.20] Drop a trailing dot when truncating generated object names - #18959

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:release-0.20from
burrows99:cherry-pick-18803-to-release-0.20-v2
Nov 17, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:release-0.20from
burrows99:cherry-pick-18803-to-release-0.20-v2

Conversation

@burrows99

@burrows99 burrows99 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Cherry pick of #18803 on release-0.20.

#18803: Drop a trailing dot when truncating generated object names

For details on the cherry pick process, see the cherry pick requests page.

The cherry-pick robot failed on the import blocks of pkg/cache/scheduler/was/virtual_pods.go and virtual_pods_test.go, which differ on release-0.20 (pkg/util/podset, k8s.io/utils/ptr). I kept the branch's imports and added only utilstrings and validation. The rest of the change applies unchanged.

What type of PR is this?

/kind bug

Useful notes for your reviewer

go build ./..., go vet and go test pass for pkg/util/strings, pkg/controller/jobframework, pkg/controller/admissionchecks/provisioning and pkg/cache/scheduler/was. With release-0.20's original workload_names.go, controller.go and virtual_pods.go, the 5 new "truncated at a dot" cases fail. With this PR, they pass.

AI tools (Claude Code) assisted with this backport; the conflicts were resolved and the tests run as described above.

Workloads: Fixed a bug that caused generated Workload and ProvisioningRequest names to contain `.-` after truncation. The API server rejected these names. Now Kueue removes trailing dots from the truncated name before it appends the hash suffix.

…ames

Backport of the main-branch fix to release-0.20.

Workload, ProvisioningRequest, ProvisioningRequest PodTemplate and virtual
Pod names are built by truncating a prefix and appending "-<hash>". When
the cut ends on a '.', the result contains ".-", which is not a valid
DNS subdomain, so the API server rejects the Workload or
ProvisioningRequest.

Add utilstrings.TruncateNamePrefix, which truncates and then trims any
trailing '.', and use it in all three name sanitizers. A trailing '-' is
kept: "--" is valid, and trimming it would change the names of existing
objects.

Conflicts resolved: the import blocks of
pkg/cache/scheduler/was/virtual_pods.go and virtual_pods_test.go differ
on release-0.20 (pkg/util/podset, k8s.io/utils/ptr); kept them and added
only the utilstrings and validation imports.

Signed-off-by: burrows99 <raunakburrows@gmail.com>
(cherry picked from commit fdf58b8)
@kubernetes-prow kubernetes-prow Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 17, 2026
@kubernetes-prow kubernetes-prow Bot added this to the v0.20 milestone Nov 17, 2026
@kubernetes-prow kubernetes-prow Bot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 17, 2026
@netlify

netlify Bot commented Nov 17, 2026

Copy link
Copy Markdown

👷 Deploy request for kubernetes-sigs-kueue pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a55bb92

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured.: 3

  • needs-ok-to-test
  • do-not-merge/work-in-progress
  • cncf-cla: no

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 17, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @burrows99. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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-sigs/prow repository.

@mbobrovskyi

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 17, 2026
@mimowo

mimowo commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2026
@kubernetes-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: d91b36f4ef1fe97e52aa999439b37d1061114dc0

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: burrows99, mimowo

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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 80f31e6 into kubernetes-sigs:release-0.20 Nov 17, 2026
54 checks passed
@mbobrovskyi

Copy link
Copy Markdown
Contributor

/set-release-note
Workloads: Fixed a bug that caused generated Workload and ProvisioningRequest names to contain .- after truncation. The API server rejected these names. Now Kueue removes trailing dots from the truncated name before it appends the hash suffix.

@github-actions

Copy link
Copy Markdown

✅ The release note was updated to:

Workloads: Fixed a bug that caused generated Workload and ProvisioningRequest names to contain `.-` after truncation. The API server rejected these names. Now Kueue removes trailing dots from the truncated name before it appends the hash suffix.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants