Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete ClusterQueue.ResourceGroups from cache_test #2545

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

gabesaba
Copy link
Contributor

@gabesaba gabesaba commented Jul 8, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

We removed the only test usage of this field in #2519 - see #2519 (comment). We are already ignoring it in the snapshot comparison.

Related to cleanup #2502

Special notes for your reviewer:

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 8, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 8, 2024
@gabesaba
Copy link
Contributor Author

gabesaba commented Jul 8, 2024

/assign @mimowo

Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit b1fc27f
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/668b98ca2bd0db00086f8cf2
😎 Deploy Preview https://deploy-preview-2545--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.

@mimowo
Copy link
Contributor

mimowo commented Jul 8, 2024

LGTM, one question:

We removed the only usage of this field in #2519 - see #2519 (comment).

if all uses are removed, can we also remove the field itself?

@gabesaba
Copy link
Contributor Author

gabesaba commented Jul 8, 2024

LGTM, one question:

We removed the only usage of this field in #2519 - see #2519 (comment).

if all uses are removed, can we also remove the field itself?

sorry, I meant the only test usage in this file

/retest

@mimowo
Copy link
Contributor

mimowo commented Jul 8, 2024

I see, so the current state is inconsistent since #1689 - the test cases specify the field, but it is ignored, we should definitely clean it up.

I'm yet wondering if it is preferable to drop the asserts or revert the ignoring. Can you provide some justification one way or another? It seems reasonable to assert cache fields in cache_test.

@gabesaba
Copy link
Contributor Author

gabesaba commented Jul 8, 2024

I see, so the current state is inconsistent since #1689 - the test cases specify the field, but it is ignored, we should definitely clean it up.

I'm yet wondering if it is preferable to drop the asserts or revert the ignoring. Can you provide some justification one way or another? It seems reasonable to assert cache fields in cache_test.

We should drop these assets. While some of the assertions in the cache test make sense, I don't think they make sense for the capacity accounting fields. I think for the capacity related fields we should be testing against higher level concepts - such as, for some ResourceFlavor, capacity, and isBorrowing. We should be able to test nominal/borrowing/lending/usage through just those two alone

@mimowo
Copy link
Contributor

mimowo commented Jul 8, 2024

Yeah, I can imagine maintaining too low-level tests might be a chore.

For now, let's clean up (even if we end up asserting on ResourceGroups in the future), as in the current form the asserts are just confusing anyway.

We will need to find a testing strategy while working on #79.

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: ddf214df1e4b772dfadcc92caa4d88363dbdb6b7

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabesaba, 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 8, 2024
@k8s-ci-robot k8s-ci-robot merged commit a94a6bb into kubernetes-sigs:main Jul 8, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.8 milestone Jul 8, 2024
@gabesaba gabesaba deleted the delete_resource_groups branch July 9, 2024 15:50
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. 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.

None yet

3 participants