Repository navigation
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Fixes a Kubernetes provider status-update edge case where comparing against a stale informer-cached object could incorrectly skip a required Gateway status update (e.g., Programmed recovery), by reading the live object from the API server before doing the status equality comparison.
Changes:
- Inject a
statusReaderinto the statusUpdateHandlerand use it toGetthe current object before comparing status updates. - Wire the provider to pass
mgr.GetAPIReader()to avoid stale cache reads during status comparison. - Add a regression test ensuring a stale cached Gateway status does not prevent a required Programmed recovery update.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/provider/kubernetes/status_updater.go | Adds an API-reader-based fetch path for status comparisons to avoid stale cache skipping updates. |
| internal/provider/kubernetes/status_updater_test.go | Adds a regression test that exercises the stale-cache comparison scenario and asserts a status write occurs. |
| internal/provider/kubernetes/kubernetes.go | Wires mgr.GetAPIReader() into the status update handler construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab81d3505c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
469d75c to
fbc7846
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9509 +/- ##
==========================================
- Coverage 81.55% 81.54% -0.02%
==========================================
Files 266 266
Lines 41568 41567 -1
==========================================
- Hits 33901 33896 -5
- Misses 7666 7670 +4
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: liuhy <[email protected]>
fbc7846 to
18e7837
Compare
|
/retest |
…rogrammed-recovery Signed-off-by: liuhy <[email protected]>
|
Any chance to consider this for some future release, or is the plan to solve it some other way? This messed with ArgoCD and other gitops tools that monitor health of gateway resources. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21e8cc2dad
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| func TestUpdateHandlerApplyReadsStatusFromStatusReader(t *testing.T) { | ||
| key := types.NamespacedName{Namespace: "default", Name: "gateway"} | ||
| staleCachedGateway := gatewayWithProgrammedStatus(key, metav1.ConditionTrue) | ||
| liveGateway := gatewayWithProgrammedStatus(key, metav1.ConditionFalse) |
There was a problem hiding this comment.
Add an end-to-end Programmed recovery regression
This user-visible bug occurs when Envoy replicas recover while the informer and API-server status differ, but the new test only constructs two disconnected fake clients and invokes apply directly. I checked test/e2e and found no scenario that makes a Gateway become unavailable and then verifies that its Programmed condition returns to True, so the manager wiring, status subscription, and actual recovery flow remain untested and could regress while this unit test still passes.
Useful? React with 👍 / 👎.
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
Test Plan
Fixes #9432