Skip to content

Conversation

@highpon
Copy link
Member

@highpon highpon commented Jul 21, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

We sometimes manipulate the internal accounting of ClusterQueue and Cohort snapshots. This is brittle. Quota/Lending Limit/Borrowing Limit/Usage should be set by calling public api methods, or by defining the CQs/Cohorts via API objects, adding to cache, and creating snapshot.

Which issue(s) this PR fixes:

#2502

Special notes for your reviewer:

This PR is part of #2502. Refactor for flavorassigner_test.go will be done in a separate PR.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 21, 2024
@k8s-ci-robot k8s-ci-robot requested review from mimowo and trasc July 21, 2024 07:38
@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 Jul 21, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @highpon. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 21, 2024
@netlify
Copy link

netlify bot commented Jul 21, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 21c2d06
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66a10b556c152a0008ae2232

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.

Thanks for doing this cleanup :)

@gabesaba
Copy link
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 Jul 22, 2024
@highpon highpon requested a review from gabesaba July 22, 2024 17:07
@mimowo
Copy link
Contributor

mimowo commented Jul 23, 2024

/approve
Leaving lgtm to @gabesaba when the comments are addressed

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: highpon, 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 23, 2024
@highpon highpon force-pushed the feat/refactor-FitInCohort-tests branch from 7ba803f to 4457656 Compare July 23, 2024 14:09
@highpon highpon force-pushed the feat/refactor-FitInCohort-tests branch from a4f450b to 9114996 Compare July 23, 2024 16:02
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.

Thank you for diligently addressing all of the comments. Just 2 small ones left

Also in title of PR, please change Cohorot to Cohort

@highpon highpon changed the title fix: Refactor FitInCohorot tests fix: Refactor FitInCohort tests Jul 24, 2024
@highpon highpon requested a review from gabesaba July 24, 2024 14:24
@gabesaba
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: c2d5fada254f3c41ea4233bfe46e459471a0e324

@k8s-ci-robot k8s-ci-robot merged commit b348ce4 into kubernetes-sigs:main Jul 25, 2024
@k8s-ci-robot k8s-ci-robot added this to the v0.9 milestone Jul 25, 2024
@highpon highpon deleted the feat/refactor-FitInCohort-tests branch July 25, 2024 08:10
gabesaba pushed a commit to gabesaba/kueue that referenced this pull request Aug 13, 2024
* fix: Refactor FitInCohorot tests

* fix: delete no-op function

* fix: use new method to add usage

* fix: to enforce resource group constraint for flavors and resources

* fix: consolidated into a single resource group

* fix: delete flavorNames

* fix: adjusted test cases to align with existing expected conditions

* fix: change FlavorResourceQuantitiesFlat value
k8s-ci-robot pushed a commit that referenced this pull request Aug 13, 2024
* Cleanup to use FlavorResourceQuantities.Add in cache (#2696)

* fix: Refactor FitInCohort tests (#2655)

* fix: Refactor FitInCohorot tests

* fix: delete no-op function

* fix: use new method to add usage

* fix: to enforce resource group constraint for flavors and resources

* fix: consolidated into a single resource group

* fix: delete flavorNames

* fix: adjusted test cases to align with existing expected conditions

* fix: change FlavorResourceQuantitiesFlat value

* Finish flattening of FlavorResourceQuantities (#2721)

* Finish Flattenning FlavorResourceQuantities

* Rename FlavorResourceQuantitiesFlat to FlavorResourceQuantities

* Cleanup preemption.go (#2800)

* [Partial Admission] Check Mode before attempting Preemption (#2809)

* Prefer Reclamation to Priority Based Preemption (#2811)

---------

Co-authored-by: s-shiraki <[email protected]>
kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
* fix: Refactor FitInCohorot tests

* fix: delete no-op function

* fix: use new method to add usage

* fix: to enforce resource group constraint for flavors and resources

* fix: consolidated into a single resource group

* fix: delete flavorNames

* fix: adjusted test cases to align with existing expected conditions

* fix: change FlavorResourceQuantitiesFlat value
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/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. 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.

4 participants