feat: allow to patch multiple resources with EPP - #8518
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ed6c528 to
ded9e1e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8518 +/- ##
==========================================
- Coverage 76.05% 76.00% -0.06%
==========================================
Files 260 260
Lines 43367 43543 +176
==========================================
+ Hits 32984 33093 +109
- Misses 8184 8236 +52
- Partials 2199 2214 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ded9e1e to
ec71f58
Compare
71f5191 to
2b6f0f4
Compare
| // If there are multiple dests and some of them fail, | ||
| // consider it as successful and ignore the failures to patch other dests. | ||
| if !anyPatched && patchErrors != nil { | ||
| tErrs = errors.Join(tErrs, patchErrors) |
There was a problem hiding this comment.
Is there a better way to handle partial failures rather than marking as programmed and success? How does a user monitor and/or become aware of failures?
There was a problem hiding this comment.
it's hard, you may want to add a http filter to all listener, but it will failed on tcp listeners which is valid.
a30674c to
5a0b04d
Compare
|
can we update the title to |
d2f646a to
2d1bd50
Compare
f638718 to
3a7991f
Compare
830fbd4 to
84692af
Compare
eb4b4b5 to
73a6372
Compare
| status.SetAcceptedForPolicyAncestor(&policy.Status, &ancestorRef, t.GatewayControllerName, policy.Generation) | ||
| } else { | ||
| // Clear any partial patches that were added before validation failed | ||
| policyIR.JSONPatches = nil |
There was a problem hiding this comment.
this is changing the existing logic, curious why we are doing it in this PR
e721c79 to
b2ec896
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2ec8965a3
ℹ️ 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".
| if !ok { | ||
| continue | ||
| } | ||
| if stringMatched(name, listener.Name) { |
There was a problem hiding this comment.
Exclude the readiness listener from broad listener selectors
When a policy uses a broad listener selector such as the new e2e RegularExpression: .*, this loop also selects the generated readiness listener (envoy-gateway-proxy-ready-*) from the same resource table, not just the listeners for the targeted Gateway. Patches that are valid for Gateway HTTP listeners, for example /default_filter_chain/... in test/e2e/testdata/envoy-patch-policy.yaml, then fail against the readiness listener and mark the policy Programmed=False, or can unintentionally mutate readiness configuration.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
this could be avoided by using corrected regex expression, @envoyproxy/gateway-maintainers should we leave this to users?
15d2562 to
723f64b
Compare
|
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! |
723f64b to
da6cc12
Compare
da6cc12 to
025b3a3
Compare
025b3a3 to
d59de64
Compare
| // TODO: return multiple resources | ||
| func findXdsResource(tCtx *types.ResourceVersionTable, p *ir.JSONPatchConfig) (cachetypes.Resource, error) { | ||
| // findXdsResources returns XDS resources to patch based on the patch configuration. | ||
| func findXdsResources(tCtx *types.ResourceVersionTable, p *ir.JSONPatchConfig) ([]cachetypes.Resource, error) { |
There was a problem hiding this comment.
do we have any data on perf hit because of using the new search which will now always go to the end of the list
There was a problem hiding this comment.
could escape early for Exact match, for other match type we couldn't.
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
d59de64 to
18d9544
Compare
0b37770 to
a12a613
Compare
Signed-off-by: zirain <zirain2009@gmail.com>
648f86b to
2d67b64
Compare
fixes: #8489