Skip to content

feat: allow to patch multiple resources with EPP#8518

Open
zirain wants to merge 5 commits into
envoyproxy:mainfrom
zirain:patch-multi-resources
Open

feat: allow to patch multiple resources with EPP#8518
zirain wants to merge 5 commits into
envoyproxy:mainfrom
zirain:patch-multi-resources

Conversation

@zirain

@zirain zirain commented Mar 13, 2026

Copy link
Copy Markdown
Member

fixes: #8489

@netlify

netlify Bot commented Mar 13, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 025b3a3
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a5ed13720ff94000888e612
😎 Deploy Preview https://deploy-preview-8518--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@zirain
zirain force-pushed the patch-multi-resources branch from ed6c528 to ded9e1e Compare March 13, 2026 06:43
@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.95238% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.48%. Comparing base (2874485) to head (025b3a3).

Files with missing lines Patch % Lines
internal/gatewayapi/envoypatchpolicy.go 11.90% 34 Missing and 3 partials ⚠️
internal/xds/translator/jsonpatch.go 66.10% 16 Missing and 4 partials ⚠️
internal/xds/translator/translator.go 73.43% 9 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8518      +/-   ##
==========================================
- Coverage   75.59%   75.48%   -0.11%     
==========================================
  Files         252      252              
  Lines       41713    41811      +98     
==========================================
+ Hits        31531    31563      +32     
- Misses       8057     8108      +51     
- Partials     2125     2140      +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zirain
zirain force-pushed the patch-multi-resources branch from ded9e1e to ec71f58 Compare March 23, 2026 06:37
@zirain
zirain marked this pull request as ready for review March 23, 2026 10:56
@zirain
zirain requested a review from a team as a code owner March 23, 2026 10:56
@zirain
zirain force-pushed the patch-multi-resources branch 2 times, most recently from 71f5191 to 2b6f0f4 Compare March 25, 2026 10:55
@zirain zirain added this to the v1.8.0-rc.1 Release milestone Mar 30, 2026
Comment thread internal/xds/translator/translator.go Outdated
Comment thread internal/xds/translator/jsonpatch.go Outdated
Comment on lines +168 to +171
// 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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's hard, you may want to add a http filter to all listener, but it will failed on tcp listeners which is valid.

@zirain
zirain force-pushed the patch-multi-resources branch 2 times, most recently from a30674c to 5a0b04d Compare April 1, 2026 08:10
@arkodg

arkodg commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

can we update the title to api instead of fix, since its changing the API

@zirain zirain changed the title fix: allow to patch multiple resources with EPP api: allow to patch multiple resources with EPP Apr 1, 2026
@zirain
zirain force-pushed the patch-multi-resources branch from d2f646a to 2d1bd50 Compare April 1, 2026 23:35
Comment thread api/v1alpha1/envoypatchpolicy_types.go Outdated
@zirain
zirain force-pushed the patch-multi-resources branch 3 times, most recently from f638718 to 3a7991f Compare April 2, 2026 04:00
Comment thread internal/xds/translator/translator.go
@zirain
zirain requested review from arkodg and jukie April 4, 2026 00:39
Comment thread api/v1alpha1/envoypatchpolicy_types.go Outdated
@zirain
zirain force-pushed the patch-multi-resources branch 3 times, most recently from 830fbd4 to 84692af Compare April 7, 2026 10:42
@zirain
zirain requested a review from arkodg April 9, 2026 07:02
@zirain zirain changed the title api: allow to patch multiple resources with EPP feat: allow to patch multiple resources with EPP Apr 14, 2026
@zirain
zirain force-pushed the patch-multi-resources branch from eb4b4b5 to 73a6372 Compare April 14, 2026 11:27
@zirain
zirain force-pushed the patch-multi-resources branch from 73a6372 to 8022ef1 Compare April 14, 2026 11:29
@zirain

zirain commented Apr 14, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8022ef1558

ℹ️ 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".

Comment thread internal/gatewayapi/envoypatchpolicy.go Outdated
Comment thread api/v1alpha1/envoypatchpolicy_types.go
@jukie

jukie commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d71e5f92ba

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/xds/translator/jsonpatch.go Outdated
Comment thread internal/xds/translator/translator.go Outdated
@zirain
zirain force-pushed the patch-multi-resources branch from d71e5f9 to 3b2041a Compare April 24, 2026 08:19
@jukie
jukie requested a review from a team April 25, 2026 02:28
status.SetAcceptedForPolicyAncestor(&policy.Status, &ancestorRef, t.GatewayControllerName, policy.Generation)
} else {
// Clear any partial patches that were added before validation failed
policyIR.JSONPatches = nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is changing the existing logic, curious why we are doing it in this PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zirain
zirain force-pushed the patch-multi-resources branch 2 times, most recently from e721c79 to b2ec896 Compare May 14, 2026 04:48
@zirain

zirain commented May 14, 2026

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be avoided by using corrected regex expression, @envoyproxy/gateway-maintainers should we leave this to users?

Comment thread release-notes/current.yaml Outdated
@zirain
zirain force-pushed the patch-multi-resources branch from 15d2562 to 723f64b Compare May 14, 2026 08:50
@github-actions

Copy link
Copy Markdown
Contributor

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!

@github-actions github-actions Bot added the stale label Jun 13, 2026
@github-actions github-actions Bot closed this Jun 20, 2026
@zirain zirain reopened this Jun 20, 2026
@github-actions github-actions Bot removed the stale label Jun 20, 2026
@zirain
zirain force-pushed the patch-multi-resources branch from 723f64b to da6cc12 Compare June 26, 2026 02:39
zirain added 5 commits July 21, 2026 09:53
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
@zirain
zirain force-pushed the patch-multi-resources branch from da6cc12 to 025b3a3 Compare July 21, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow EPP to patch all listeners when target to GatewayClass

3 participants