Fix listener matched status using aggregated network addresses - #2567
Fix listener matched status using aggregated network addresses#2567AryanP123 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughNetwork address data now flows from controller status updates into binding-status computation. Matching connector and listener checks use aggregated address counts when local connector or listener records are unavailable. ChangesNetwork address matching
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: 🔵 Low · up to Listener and connector status now uses aggregated remote address counts, but the new matching path lacks regression coverage. A future change could silently reintroduce incorrect Pending or no-match status for remote connectors. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Team
Run ID: c531539e-caa4-489c-89eb-3dbacf896d68
📒 Files selected for processing (4)
internal/kube/controller/controller.gointernal/kube/site/binding_status.gointernal/kube/site/site.gointernal/kube/site/site_test.go
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| } | ||
|
|
||
| if err := s.NetworkStatusUpdated(tt.args.siteRecord); (err != nil) != tt.wantErr { | ||
| if err := s.NetworkStatusUpdated(tt.args.siteRecord, nil); (err != nil) != tt.wantErr { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add a regression test for address-count matching.
This test passes nil for addresses, so it does not exercise the new remote matching path. Add cases with AddressInfo.ConnectorCount and AddressInfo.ListenerCount, then assert the listener and connector matching status.
|
@AryanP123 Can you explain what's going on here? I'm not sure I can make much sense of the changes here or the reporter's diagnosis. the status addresses and siteStatuses comes from the same source: if the connector-site's records were purged, the connector should have gone with it. My best wild guess as to what's actually going on here, based on having flirted with changing this several times, is that this is a problem with the purge logic. Ex: network is up and the router at the docker site |
|
@c-kruse Yeah, fair point. This PR doesn't fix purge logic. It just makes kube I couldn't repro it naturally with kind+podman, but I could trigger the same wrong status by editing the network status configmap to match what the reporter saw. Happy to look at the purge path instead if you'd rather fix it there. Lmk what you think |
|
@AryanP123 I think we should focus on the purge path instead: it should fix "both" bugs implicitly reported here (missing Site from network status, and inconsistent listener/connector status), and potentially similar network-observer bugs we haven't found yet with the same pattern. All of this skupper-network-status + statusSync stuff is something we plan to deprecate in 2.3 and remove soon after (2.4?), if we focus on the purge/sources path instead we at least get one long-term fix (in the network-observer.) Added #2568 with some more context from my previous attempts. |
Fixes #2428
Summary by CodeRabbit