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

Improve realizedstate check for resources with dependency (#1014) #1015

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

yanjunz97
Copy link
Contributor

NSX LBS realization has dependency on the gateway-interface. If gateway-interface
is not realized before NSX LBS realization timeout, the realized state API will return
a ProviderNotReady error. But later on the NSX LBS realization can become Realized
after the gateway-interface realization succeeds. Thus for NSX operator, we enhance
the realized state check to

  • Check gateway-interface when check the VPC realized state
  • Retry when ProviderNotReady error is detected

…zu#1014)

NSX LBS realization has dependency on the gateway-interface. If gateway-interface is not realized
before NSX LBS realization timeout, the realized state API will return a ProviderNotReady error.
But later on the NSX LBS realization can become Realized after the gateway-interface realization
succeeds. Thus for NSX operator, we enhance the realized state check to

Check gateway-interface when check the VPC realized state
Retry when ProviderNotReady error is detected

Signed-off-by: Yanjun Zhou <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 80.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 74.24%. Comparing base (954ed89) to head (02e3e62).

Files with missing lines Patch % Lines
pkg/nsx/services/vpc/vpc.go 0.00% 6 Missing ⚠️
pkg/nsx/util/errors.go 88.88% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1015      +/-   ##
==========================================
+ Coverage   74.22%   74.24%   +0.01%     
==========================================
  Files         118      118              
  Lines       16378    16398      +20     
==========================================
+ Hits        12157    12175      +18     
- Misses       3451     3453       +2     
  Partials      770      770              
Flag Coverage Δ
unit-tests 74.24% <80.00%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
pkg/nsx/services/common/types.go 100.00% <ø> (ø)
pkg/nsx/services/realizestate/realize_state.go 100.00% <100.00%> (ø)
pkg/nsx/services/subnet/subnet.go 70.27% <100.00%> (ø)
pkg/nsx/services/subnetport/subnetport.go 82.56% <100.00%> (ø)
pkg/nsx/util/errors.go 92.21% <88.88%> (-0.27%) ⬇️
pkg/nsx/services/vpc/vpc.go 55.08% <0.00%> (ø)

@yanjunz97 yanjunz97 merged commit 6c54354 into vmware-tanzu:main Jan 26, 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