kueue icon indicating copy to clipboard operation
kueue copied to clipboard

Cleanup manipulation of CQ/Cohort resource accounting in tests

Open vladikkuzn opened this issue 1 year ago • 10 comments

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #2749

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

vladikkuzn avatar Aug 25 '24 23:08 vladikkuzn

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

k8s-ci-robot avatar Aug 25 '24 23:08 k8s-ci-robot

/assign

vladikkuzn avatar Aug 25 '24 23:08 vladikkuzn

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
Latest commit 48760104cabd7c4042a46475ceac712ff1954d33
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/672242a64159180008433c7c
Deploy Preview https://deploy-preview-2889--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 site configuration.

netlify[bot] avatar Aug 25 '24 23:08 netlify[bot]

/ok-to-test

vladikkuzn avatar Aug 27 '24 12:08 vladikkuzn

/cc @gabesaba

vladikkuzn avatar Aug 27 '24 12:08 vladikkuzn

This was not the part of flavorassigner_test which needed refactoring. It is in particular this that we want to delete: https://github.com/kubernetes-sigs/kueue/blob/c257cc03b0d86c6fac29e851de07a29c02e30ec8/pkg/scheduler/flavorassigner/flavorassigner_test.go#L1961-L1962

We want to avoid overriding these fields manually, instead indirectly set this usage/capacity via ClusterQueues. See https://github.com/kubernetes-sigs/kueue/issues/2502#issuecomment-2228679747

gabesaba avatar Aug 27 '24 12:08 gabesaba

Additionally this https://github.com/kubernetes-sigs/kueue/blob/c257cc03b0d86c6fac29e851de07a29c02e30ec8/pkg/scheduler/flavorassigner/flavorassigner_test.go#L1964

All the usage can be manipulated by calling ClusterQueueSnapshot.AddUsage.

Cohort resources can be added via the main test CQ, and in some cases, a secondary test CQ which lends resources and does nothing else

gabesaba avatar Aug 27 '24 12:08 gabesaba

/cc @mszadkow

vladikkuzn avatar Oct 14 '24 08:10 vladikkuzn

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

k8s-ci-robot avatar Oct 30 '24 14:10 k8s-ci-robot

/retest

mszadkow avatar Oct 30 '24 14:10 mszadkow

I have a feeling that some test cases names are confusing. Tests work with one cluster but the test case is "lend", isn't lending between the clusterqueues? E.g. "lend try next flavor, found the second flavor" wdyt @vladikkuzn @mbobrovskyi @gabesaba ?

mszadkow avatar Oct 30 '24 14:10 mszadkow

I have a feeling that some test cases names are confusing. Tests work with one cluster but the test case is "lend", isn't lending between the clusterqueues? E.g. "lend try next flavor, found the second flavor" wdyt @vladikkuzn @mbobrovskyi @gabesaba ?

Or invalid test case.

mbobrovskyi avatar Oct 31 '24 05:10 mbobrovskyi

I have a feeling that some test cases names are confusing. Tests work with one cluster but the test case is "lend", isn't lending between the clusterqueues? E.g. "lend try next flavor, found the second flavor" wdyt @vladikkuzn @mbobrovskyi @gabesaba ?

Or invalid test case.

I will take closer look it's only 4 of them.

mszadkow avatar Oct 31 '24 09:10 mszadkow

@gabesaba @vladikkuzn that's another PR that only addresses cohortResource issue: https://github.com/kubernetes-sigs/kueue/pull/3398

mszadkow avatar Oct 31 '24 12:10 mszadkow

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 avatar Nov 06 '24 01:11 k8s-ci-robot

@vladikkuzn you can close this one I believe

mszadkow avatar Nov 12 '24 10:11 mszadkow