-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xds: mesh gateway CDS requests are now allowed to receive an empty CDS reply #6787
Conversation
@@ -83,7 +83,7 @@ func (s *ConfigSnapshot) Valid() bool { | |||
case structs.ServiceKindConnectProxy: | |||
return s.Roots != nil && s.ConnectProxy.Leaf != nil | |||
case structs.ServiceKindMeshGateway: | |||
return s.Roots != nil && (s.MeshGateway.WatchedServicesSet || len(s.MeshGateway.WatchedServices) > 0) | |||
return s.Roots != nil && (s.MeshGateway.WatchedServicesSet || len(s.MeshGateway.ServiceGroups) > 0) |
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.
This is restoring the original length check which actually didn't have to get changed in the first PR.
0ddcd46
to
cbde438
Compare
Codecov Report
@@ Coverage Diff @@
## master #6787 +/- ##
==========================================
- Coverage 65.82% 65.82% -0.01%
==========================================
Files 431 431
Lines 52292 52285 -7
==========================================
- Hits 34421 34415 -6
- Misses 13747 13750 +3
+ Partials 4124 4120 -4
Continue to review full report at Codecov.
|
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.
Looks fine, thanks for making that change.
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.
LGTM.
I'm still not 100% sure if the empty results filter is actually worth having at all. I added it originally thinking that was never valid. Then removed it to fix the "no healthy instances make sidecar hang" bug, then brought it back just because I realised there was a more semantically correct fix for that as noted in the comment.
At this point we've found another example of why it's valid so I'm totally fine with this as a conservative approach for now, but I feel like if we hit more reasonable cases where sending an empty response is correct and valid we should probably just ditch the check completely - it's one of those cases where "empty isn't necessarily the same as not-set-yet".
Hey there, This issue has been automatically locked because it is closed and there hasn't been any activity for at least 30 days. If you are still experiencing problems, or still have questions, feel free to open a new one 👍. |
This is the rest of the fix for #6543 that was incompletely fixed in #6576.