Skip to content

Conversation

@lchrzaszcz
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

To achieve slice-only TAS, user has to provide slice required topology, slice size and optionally unconstrained annotation. Due to a bug in validation, if user provides slice required topology without required, preferred or unconstrained annotations, Kueue will ignore slice topology and rank-ordering of the pods.

This PR fixes that issue and adds explicit end-to-end test for rank-ordering in slice-only TAS.

Which issue(s) this PR fixes:

Special notes for your reviewer:

I am leaving release notes as NONE, because this is a fix to TAS which is targeted at 0.13 anyway.

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Jul 8, 2025
@netlify
Copy link

netlify bot commented Jul 8, 2025

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 74b8afe
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/686d49a5f369370009814e6d
😎 Deploy Preview https://deploy-preview-5905--kubernetes-sigs-kueue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot requested review from kannon92 and tenzen-y July 8, 2025 16:39
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 8, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @lchrzaszcz. 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.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 8, 2025
@mimowo
Copy link
Contributor

mimowo commented Jul 8, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot 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 Jul 8, 2025
Copy link
Contributor

@gabesaba gabesaba left a comment

Choose a reason for hiding this comment

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

/lgtm

thanks!

sliceKey := s.sliceLevelKeyWithDefault(r, s.lowestLevel())

_, mainTopologyFound := s.resolveLevelIdx(*mainKey)
_, sliceTopologyFound := s.resolveLevelIdx(sliceKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the defaulting logic, sliceTopologyFound is false iff the user provided an invalid slice key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, that is correct.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 9, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ffb9d361ef10231936c039e4f2ae428c0c73c780

@mimowo
Copy link
Contributor

mimowo commented Jul 10, 2025

/approve
Looks great, thank you!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2025
@mimowo
Copy link
Contributor

mimowo commented Jul 10, 2025

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2025
@mimowo
Copy link
Contributor

mimowo commented Jul 10, 2025

/unhold
Ok, let it merge anyway, but a follow up question (potentially cleanup issue): can we add a unit test for this, so that it is easier to debug? I think the e2e test is still valuable, but looking also for something lightweight.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2025
@lchrzaszcz
Copy link
Contributor Author

/unhold Ok, let it merge anyway, but a follow up question (potentially cleanup issue): can we add a unit test for this, so that it is easier to debug? I think the e2e test is still valuable, but looking also for something lightweight.

Sure! I agree that e2e is valuable and I explicitly wanted to add it, to be sure that rank-ordering for slice-only topologies work as expected because it did work in unit tests, but due to validation in earlier stage it turned out the code for that was never used. I think we should add test for validation, because this is the one test that is missing. WDYT?

@mimowo
Copy link
Contributor

mimowo commented Jul 10, 2025

Unit test for validation is one thing + I think we could also add a unit test demonstrating the changes done to pkg/cache/tas_flavor_snapshot.go, wdyt?

@k8s-ci-robot k8s-ci-robot merged commit 63b5ed7 into kubernetes-sigs:main Jul 10, 2025
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.13 milestone Jul 10, 2025
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Aug 11, 2025
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-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants