-
Notifications
You must be signed in to change notification settings - Fork 836
fix(operator): make RuntimeInfo thread-safe by using instance field #2874
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
Conversation
5239894 to
4afa87b
Compare
Test FailuresThe unit tests are failing because I'm not really sure how to proceed - should I change the tests or export it as |
|
@Deepam02 You might need to explore why unit tests are failing |
You can leverage the cmp ignore options to ignore syncPods functions in tests. |
Fixes kubeflow#2873 Signed-off-by: Deepam02 <[email protected]>
4afa87b to
5f9a7f5
Compare
Signed-off-by: Deepam02 <[email protected]>
5f9a7f5 to
ab4ef92
Compare
Signed-off-by: Deepam Goyal <[email protected]>
|
@tenzen-y @andreyvelich please put a review |
|
/milestone v2.1 |
Pull Request Test Coverage Report for Build 18921020248Warning: 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 |
|
/assign @tenzen-y @astefanutti As we discussed we might want to merge this PR before v2.1 |
Nice, but TBH it is not a blocker for Kueue, Also, I think it does not really impact API so could also be released in 2.1.1 for example. |
|
Make sense! As we talked today, this is not blocking, but "nice to have" feature. |
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.
Thank you for working on this PR. This mostly LGTM
Could you fix the formatting errors?
You can fix with the following make command:
Lines 157 to 160 in 6109d36
| # Instructions for code formatting. | |
| .PHONY: fmt | |
| fmt: ## Run go fmt against the code. | |
| go fmt ./... |
Co-authored-by: Yuki Iwai <[email protected]> Signed-off-by: Deepam Goyal <[email protected]>
Signed-off-by: Deepam02 <[email protected]>
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.
/ok-to-test
Co-authored-by: Yuki Iwai <[email protected]> Signed-off-by: Deepam Goyal <[email protected]>
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 am assuming CI passed.
Thank you!
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
|
@Deepam02 Please can you rebase your PR to fix CI ? |
|
@andreyvelich: Closed this PR. In response to this:
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. |
Fixes #2873
What this PR does / why we need it:
Quick fix for the data race when calling
RuntimeInfoconcurrently.The issue was a global
syncPodSetsvariable getting hammered by multiple goroutines at once. Moved it to an instance field in theInfostruct so each call gets its own copy - no more shared state, no more race conditions.Pretty straightforward change but I did an intensive code review to make sure it actually solves the problem. Traced through all the call sites and execution flows to verify each
RuntimeInfo()creates an isolated instance with no shared mutable state between concurrent calls.Which issue(s) this PR fixes:
Fixes #2873
Checklist: