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

Refactor FlavorAssigner #3536

Merged

Conversation

gabesaba
Copy link
Contributor

@gabesaba gabesaba commented Nov 14, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Simplifies FlavorAssigner in preparation for #3405

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Change, and in some scenarios fix, the status message displayed to user when a workload doesn't fit in available capacity.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 14, 2024
@k8s-ci-robot k8s-ci-robot requested review from mimowo and trasc November 14, 2024 14:37
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 14, 2024
Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit e92da7a
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/67360e242ff0300008b3345f

@gabesaba gabesaba force-pushed the refactor_flavor_assigner branch from 8e5bdb9 to e92da7a Compare November 14, 2024 14:50
@PBundyra
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 Nov 14, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3e562b8b4122a6b4751d3fd2e33429fa2c28ae3b

@gabesaba
Copy link
Contributor Author

/lgtm

thanks for the review!

}
status.append(msg)

status.append(fmt.Sprintf("insufficient unused quota for %s in flavor %s, %s more needed",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to set this message even if val <= rQuota.Nominal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We did this (a similar message) before, and I think the message is still relevant/accurate - other quota is being used

@@ -1660,7 +1659,7 @@ func TestAssignFlavors(t *testing.T) {
{
Name: "main",
Status: &Status{
reasons: []string{"insufficient unused quota in cohort for cpu in flavor one, 11 more needed"},
reasons: []string{"insufficient quota for cpu in flavor one, request > maximum capacity (12 > 11)"},
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually showing the message is fixed

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
/approve
We will be cherry-picking this one probably too.

@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 Nov 14, 2024
@mimowo
Copy link
Contributor

mimowo commented Nov 14, 2024

/release-note-edit

Change, and in some scenarios fix, the status message displayed to user when a workload doesn't fit in available capacity.

proposal

@k8s-ci-robot k8s-ci-robot merged commit c655645 into kubernetes-sigs:main Nov 14, 2024
17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.10 milestone Nov 14, 2024
@mimowo
Copy link
Contributor

mimowo commented Nov 14, 2024

/kind bug
Due to the inaccurate message as per #3536 (comment).

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 14, 2024
@mimowo
Copy link
Contributor

mimowo commented Nov 15, 2024

/cherry-pick release-0.9

@k8s-infra-cherrypick-robot
Copy link
Contributor

@mimowo: new pull request created: #3549

In response to this:

/cherry-pick release-0.9

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.

@mimowo
Copy link
Contributor

mimowo commented Nov 15, 2024

/cherry-pick release-0.8

@k8s-infra-cherrypick-robot
Copy link
Contributor

@mimowo: #3536 failed to apply on top of branch "release-0.8":

Applying: Refactor FlavorAssigner
Using index info to reconstruct a base tree...
M	pkg/resources/requests.go
M	pkg/scheduler/flavorassigner/flavorassigner.go
M	pkg/scheduler/flavorassigner/flavorassigner_test.go
M	test/integration/scheduler/fairsharing/fair_sharing_test.go
M	test/integration/scheduler/scheduler_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/integration/scheduler/scheduler_test.go
CONFLICT (content): Merge conflict in test/integration/scheduler/scheduler_test.go
Auto-merging test/integration/scheduler/fairsharing/fair_sharing_test.go
Auto-merging pkg/scheduler/flavorassigner/flavorassigner_test.go
CONFLICT (content): Merge conflict in pkg/scheduler/flavorassigner/flavorassigner_test.go
Auto-merging pkg/scheduler/flavorassigner/flavorassigner.go
CONFLICT (content): Merge conflict in pkg/scheduler/flavorassigner/flavorassigner.go
Auto-merging pkg/resources/requests.go
CONFLICT (content): Merge conflict in pkg/resources/requests.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Refactor FlavorAssigner

In response to this:

/cherry-pick release-0.8

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.

@gabesaba gabesaba deleted the refactor_flavor_assigner branch November 15, 2024 16:18
gabesaba added a commit to gabesaba/kueue that referenced this pull request Nov 15, 2024
k8s-ci-robot pushed a commit that referenced this pull request Nov 15, 2024
* cherry-pick #3536

* cherry-pick #3547
kannon92 pushed a commit to kannon92/kueue that referenced this pull request Dec 5, 2024
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/bug Categorizes issue or PR as related to a bug. 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 Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants