Skip to content

[release-0.19] Drop a trailing dot when truncating generated object names - #18960

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

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

Conversation

@burrows99

@burrows99 burrows99 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Cherry pick of #18803 on release-0.19.

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

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

pkg/cache/scheduler/was/virtual_pods.go is not on release-0.19, so this PR leaves out the virtualPodName change and its test. The Workload and ProvisioningRequest name fixes apply unchanged. The two test-file conflicts are resolved as follows:

  • The provisioning test keeps the branch's metav1 import.
  • pkg/util/strings/strings_test.go gets TestTruncateNamePrefix only. TestJoinMap came from main's context, and JoinMap is not on this branch.

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 and pkg/controller/admissionchecks/provisioning. With release-0.19's original workload_names.go and controller.go, the 4 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.19.

Workload, ProvisioningRequest and ProvisioningRequest PodTemplate 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 both name sanitizers. A trailing '-' is
kept: "--" is valid, and trimming it would change the names of existing
objects.

Conflicts resolved: pkg/cache/scheduler/was/virtual_pods.go does not
exist on release-0.19, so the virtualPodName change and its test are
dropped. The provisioning test keeps the release branch's metav1 import,
and TestJoinMap (JoinMap is not on release-0.19) is not added to
pkg/util/strings/strings_test.go.

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.19 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 1d39260

@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 the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label 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.

@kubernetes-prow kubernetes-prow Bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 17, 2026
@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: 9c3724bddd21d70adbce3c4fd1d6e0455cd78d51

@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 9813daa into kubernetes-sigs:release-0.19 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