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

[cherry-pick]Fix Subnet update error detection (#991) #1010

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

yanjunz97
Copy link
Contributor

Operator modifies the existing Subnet in store before updating the NSX Subnet, which results in the next reconcile will find the updated Subnet already in store, skip the update, and overwrite the Status as Ready. This PR uses a copy when updating the Subnet to avoid this issue.

Operator modifies the existing Subnet in store before updating the NSX Subnet,
which results in the next reconcile will find the updated Subnet already in store,
skip the update, and overwrite the Status as Ready.
This PR uses a copy when updating the Subnet to avoid this issue.

Signed-off-by: Yanjun Zhou <yanjun.zhou@broadcom.com>
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.90%. Comparing base (313ccdb) to head (38540e9).

Files with missing lines Patch % Lines
pkg/nsx/services/subnet/subnet.go 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           v4.2.0    #1010      +/-   ##
==========================================
+ Coverage   74.79%   74.90%   +0.10%     
==========================================
  Files         118      118              
  Lines       16383    16377       -6     
==========================================
+ Hits        12254    12267      +13     
+ Misses       3358     3343      -15     
+ Partials      771      767       -4     
Flag Coverage Δ
unit-tests 74.90% <95.45%> (+0.10%) ⬆️
Files with missing lines Coverage Δ
pkg/nsx/services/subnet/builder.go 87.67% <100.00%> (+0.17%) ⬆️
pkg/nsx/services/subnet/subnet.go 70.27% <94.11%> (+4.97%) ⬆️

@yanjunz97 yanjunz97 merged commit 12943ca into vmware-tanzu:v4.2.0 Jan 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants