Skip to content

fix: deep copy labels and annotations in SyncPodToGs#329

Merged
chrisliu1995 merged 1 commit into
openkruise:masterfrom
chrisliu1995:fix/gs-nodename-label-sync
Apr 13, 2026
Merged

fix: deep copy labels and annotations in SyncPodToGs#329
chrisliu1995 merged 1 commit into
openkruise:masterfrom
chrisliu1995:fix/gs-nodename-label-sync

Conversation

@chrisliu1995
Copy link
Copy Markdown
Member

No description provided.

…me label sync works

The oldGsLabels and oldGsAnnotations were direct references to the internal
map, causing reflect.DeepEqual to always return true after modifications.
This prevented the patch operation from executing, making the nodeName label
(and other metadata changes) never persist to the GameServer object.
@kruise-bot kruise-bot requested review from FillZpp and furykerry April 10, 2026 09:40
@kruise-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign furykerry for approval by writing /assign @furykerry in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.77%. Comparing base (206e756) to head (379cf6e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controllers/gameserver/gameserver_manager.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #329   +/-   ##
=======================================
  Coverage   40.76%   40.77%           
=======================================
  Files         112      112           
  Lines       12544    12548    +4     
=======================================
+ Hits         5114     5116    +2     
- Misses       7019     7020    +1     
- Partials      411      412    +1     
Flag Coverage Δ
unittests 40.77% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisliu1995 chrisliu1995 merged commit 914e8c3 into openkruise:master Apr 13, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants