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

Dereference StopPolicy before equality check #1897

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

gabesaba
Copy link
Contributor

@gabesaba gabesaba commented Mar 25, 2024

What type of PR is this?

What this PR does / why we need it:

I was investigating why we were doing a large amount of workload reconciles, and found that this equality check wasn't working as intended.

Compare workload reconciles before/after (1k jobs, 10k pods)

workload_reconciles

Does this PR introduce a user-facing change?

Reduce number of Workload reconciliations due to wrong equality check.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 25, 2024
@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 Mar 25, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @gabesaba. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit c242f4b
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6602a31a474abf0008659031

@tenzen-y
Copy link
Member

/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 Mar 25, 2024
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

Great catch!

pkg/controller/core/workload_controller.go Outdated Show resolved Hide resolved
Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
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, I'm wondering if we should follow up with a unit test. WDYT @tenzen-y @gabesaba ?

@tenzen-y
Copy link
Member

LGTM, I'm wondering if we should follow up with a unit test. WDYT @tenzen-y @gabesaba ?

@mimowo I agree with you. But I'm not sure how to implement any unit tests against event handlers.
Anyway, this PR is already mergeable.

/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 Mar 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4c0c2e50539778cdef176c49209910a383ada99e

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabesaba, tenzen-y

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 Mar 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit 70e1b52 into kubernetes-sigs:main Mar 26, 2024
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.7 milestone Mar 26, 2024
@alculquicondor
Copy link
Contributor

/lgtm
/approve

@alculquicondor
Copy link
Contributor

I meant to say
/cherry-pick release-0.6
:)

@alculquicondor
Copy link
Contributor

/cherry-pick release-0.6

@k8s-infra-cherrypick-robot

@alculquicondor: new pull request created: #1917

In response to this:

I meant to say
/cherry-pick release-0.6
:)

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/test-infra repository.

@k8s-infra-cherrypick-robot

@alculquicondor: new pull request could not be created: failed to create pull request against kubernetes-sigs/kueue#release-0.6 from head k8s-infra-cherrypick-robot:cherry-pick-1897-to-release-0.6: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for k8s-infra-cherrypick-robot:cherry-pick-1897-to-release-0.6."}],"documentation_url":"https://docs.github.com/rest/pulls/pulls#create-a-pull-request"}

In response to this:

/cherry-pick release-0.6

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/test-infra repository.

@alculquicondor
Copy link
Contributor

/release-note-edit

Reduce number of Workload reconciliations

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 26, 2024
@alculquicondor
Copy link
Contributor

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 9, 2024
@gabesaba gabesaba deleted the fix_equality branch April 10, 2024 14:24
vsoch pushed a commit to researchapps/kueue that referenced this pull request Apr 18, 2024
* Dereference StopPolicy before equality check

* Update pkg/controller/core/workload_controller.go

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

* Update pkg/controller/core/workload_controller.go

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>

---------

Co-authored-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
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. 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 Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants