-
Notifications
You must be signed in to change notification settings - Fork 236
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
fix(nodeclaim): dedup logs marking consolidatable #2018
base: main
Are you sure you want to change the base?
fix(nodeclaim): dedup logs marking consolidatable #2018
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: flavono123 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 |
Hi @flavono123. 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 Once the patch is verified, the new status will be reflected by the 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. |
Signed-off-by: flavono123 <[email protected]>
501f898
to
518ff10
Compare
Pull Request Test Coverage Report for Build 13467561188Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
nodeClaim.StatusConditions().SetTrue(v1.ConditionTypeConsolidatable) | ||
// We sleep here after a set operation since we want to ensure that we are able to read our own writes | ||
// so that we avoid duplicating log lines due to quick re-queues from our node watcher | ||
time.Sleep(100 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only sleep if the condition has changed. Otherwise, we risk sleeping on every iteration
…datable Signed-off-by: flavono123 <[email protected]>
nodeClaim.StatusConditions().SetTrue(v1.ConditionTypeConsolidatable) | ||
// We sleep here after a set operation since we want to ensure that we are able to read our own writes | ||
// so that we avoid duplicating log lines due to quick re-queues from our node watcher | ||
time.Sleep(100 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this sleep here isn't actually going to do anything. The sleep needs to come after the Patch to give the cache time to update. If we just sleep here without doing a cache update, we aren't really accomplishing the deduping that we intended
Fixes #2002
Description
after set a nodeclaim is consolidatable, pause a while for a node handler does not work duplicated jobs
How was this change tested?
no, but guess it works since there are other cases referenced
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.