fix: align hash calculation between SandboxSet and Sandbox controllers#124
fix: align hash calculation between SandboxSet and Sandbox controllers#124ongdisheng wants to merge 3 commits intoopenkruise:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @ongdisheng! It looks like this is your first PR to openkruise/agents 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #124 +/- ##
==========================================
- Coverage 52.26% 52.09% -0.18%
==========================================
Files 91 90 -1
Lines 5221 5158 -63
==========================================
- Hits 2729 2687 -42
+ Misses 2268 2256 -12
+ Partials 224 215 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@ongdisheng: PR needs rebase. DetailsInstructions 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. |
Ⅰ. Describe what this PR does
This PR fixes the hash calculation inconsistency between SandboxSet and Sandbox controllers by aligning both to use the same
HashSandbox()method. Previously, SandboxSet usedHashControllerRevision()method while Sandbox usedHashSandbox(), causing different revision hashes for identical templates.Ⅱ. Does this pull request fix one issue?
Fixes #37
Ⅲ. Describe how to verify it
Run the unit tests to verify:
go test ./pkg/controller/sandboxset -vⅣ. Special notes for reviews
I have also manually verify by deploying a SandboxSet and verify that both the SandboxSet and its created Sandboxes produce identical revision hashes for the same template.
Before fix
After fix