Skip to content

Add priority_class label to kueue_local_queue_resource_reservation#8426

Closed
andrewseif wants to merge 2 commits intokubernetes-sigs:mainfrom
andrewseif:local_queue_resource_reservation
Closed

Add priority_class label to kueue_local_queue_resource_reservation#8426
andrewseif wants to merge 2 commits intokubernetes-sigs:mainfrom
andrewseif:local_queue_resource_reservation

Conversation

@andrewseif
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add priority_class label to kueue_local_queue_resource_reservation

Which issue(s) this PR fixes:

Part of #8249

Special notes for your reviewer:

Does this PR introduce a user-facing change?

no

NONE

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

netlify Bot commented Dec 29, 2025

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 984f68c
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/69526b10fbc1870008d1a5cc
😎 Deploy Preview https://deploy-preview-8426--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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 29, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @andrewseif. Thanks for your PR.

I'm waiting for a github.com 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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andrewseif
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 29, 2025
@mbobrovskyi
Copy link
Copy Markdown
Contributor

/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 Dec 29, 2025
for _, flavor := range queue.Status.FlavorsReservation {
for _, r := range flavor.Resources {
metrics.ReportLocalQueueResourceReservations(localQueueReferenceFromLocalQueue(queue), string(flavor.Name), string(r.Name), resource.QuantityToFloat(&r.Total), tracker)
metrics.ReportLocalQueueResourceReservations(localQueueReferenceFromLocalQueue(queue), string(flavor.Name), string(r.Name), resource.QuantityToFloat(&r.Total), "", tracker)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure I got why empty string?

Copy link
Copy Markdown
Contributor Author

@andrewseif andrewseif Dec 29, 2025

Choose a reason for hiding this comment

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

as far as I understand, we are reporting aggregate metrics from queue.Status.FlavorsReservation, which represents the total resources across all workloads, without per-priority-class breakdown.

Since the data structure doesn't contain priority class information here, I passed an empty string "" to indicate "all priority classes combined" or "unspecified priority class".

I am not sure this is correct, I would love to know your thoughts, about what should be passed here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since the data structure doesn't contain priority class information here, I passed an empty string "" to indicate "all priority classes combined" or "unspecified priority class".

What’s the idea behind this? Why do we need a useless label?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The idea in the original ticket #8249 , is to add priority class to local_queue_resource_reservation.

But we also need to add priorityClass to ReportLocalQueueResourceReservations, which means I need to add it to this for loop, but the current data structure(AKA LocalQueue ) doesn't have the priority.

Now I know we need to get the priority for each workload inside the queue, but I'm not sure how we can do that without doing some changes.

We could also just remove the PriorityClass from the report function?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could also just remove the PriorityClass from the report function?

Do we have this? I thought you’d added it.

@mbobrovskyi
Copy link
Copy Markdown
Contributor

Please add an integration test to cover this.

@andrewseif
Copy link
Copy Markdown
Contributor Author

lets put this PR on hold for now, until we get further info about the design changes.

@andrewseif andrewseif closed this Dec 31, 2025
@andrewseif andrewseif reopened this Jan 8, 2026
@andrewseif
Copy link
Copy Markdown
Contributor Author

/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 Jan 8, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@andrewseif: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kueue-test-e2e-main-1-35 984f68c link true /test pull-kueue-test-e2e-main-1-35

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2026
@andrewseif andrewseif closed this Mar 22, 2026
@andrewseif andrewseif deleted the local_queue_resource_reservation branch March 22, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

3 participants