Skip to content

Conversation

@Singularity23x0
Copy link
Contributor

@Singularity23x0 Singularity23x0 commented Nov 28, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Part 2/3 of updating the queue cache.
The PR introduces changes allowing for O(1) time retrieval of the current state of the workload assumed into the queue cache. This allows making the update/deletion methods independent from an object representing the state of the workload before the update.

Which issue(s) this PR fixes:

Part 1.2 of addressing: #5310

Special notes for your reviewer:

Created from #7915

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Nov 28, 2025
@netlify
Copy link

netlify bot commented Nov 28, 2025

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 21d9f03
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/692dab6791518d000866e8fa

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 28, 2025
@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 Nov 28, 2025
@k8s-ci-robot
Copy link
Contributor

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

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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 28, 2025
@Singularity23x0 Singularity23x0 marked this pull request as ready for review November 28, 2025 16:12
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2025
@Singularity23x0 Singularity23x0 marked this pull request as draft November 28, 2025 16:24
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2025
@pajakd
Copy link
Contributor

pajakd commented Dec 1, 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 Dec 1, 2025
@Singularity23x0 Singularity23x0 marked this pull request as ready for review December 1, 2025 12:14
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 1, 2025
@k8s-ci-robot k8s-ci-robot requested a review from kannon92 December 1, 2025 12:14
Copy link
Contributor

@olekzabl olekzabl left a comment

Choose a reason for hiding this comment

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

Nice! Though some more minor comments.

@olekzabl
Copy link
Contributor

olekzabl commented Dec 1, 2025

/lgtm

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

LGTM label has been added.

Git tree hash: 2ef83dc41dd58962f464055f949c596915d04c5a

continue
}
wl := cq.Pop()
m.reportPendingWorkloads(cqName, cq)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this moved? It looks unrelated to the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To summarize the discussion on this issue we had on the previous iteration of the pr:

One of the tests (test/integration/singlecluster/controller/jobs/appwrapper/appwrapper_controller_test.go -> Should schedule AppWrappers as they fit in their ClusterQueue) had an issue with reporting pending workloads, where the existence of the "inflight" workload would make it think there is one pending.
With the reporting being set after the nil check, this remained the case, whereas now, if the inflight is set back to nil, the metric will be corrected accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense, but is this test failing only after the PR? I'm wondering if we should consider this as a small bug we would cherrypick, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My investigations were inconclusive as to what exactly in the changes cause this issue to become visible, my best bet so far is that changes to the logic made some async operations be delayed, happening later than planned and as such not caching this particular update to the inflight field in time.
I can split it as a bug fix and put it in a separate pr to be merged beforehand, working on it.

Copy link
Contributor

@mimowo mimowo Dec 2, 2025

Choose a reason for hiding this comment

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

So if we don't change the location of the line on the new version, is the test failing consistently or flaking?

Also, do you have an example run which failed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#8037

Update: un-drafted and ready

Copy link
Contributor

@mimowo mimowo Dec 2, 2025

Choose a reason for hiding this comment

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

Yeah, thank you for extracting. It would still be great to spend some time trying to understand what is the issue here, and its impact. It would be greatly appreciated if you can try to push the investigation a bit more

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added more info on test flakieness: #8037 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit / question

@mimowo
Copy link
Contributor

mimowo commented Dec 3, 2025

@Singularity23x0 please rebase

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 3, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kshalot, olekzabl, Singularity23x0
Once this PR has been reviewed and has the lgtm label, please assign gabesaba for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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/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.

6 participants