Skip to content

[release/v1.9] cherry pick for v1.9.1 - #9872

Merged
zirain merged 14 commits into
envoyproxy:release/v1.9from
kkk777-7:cherry-pick-v1.9.1
Aug 28, 2026
Merged

zirain merged 14 commits into
envoyproxy:release/v1.9from
kkk777-7:cherry-pick-v1.9.1

Conversation

@kkk777-7

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Cherry pick for v1.9.1 from https://github.com/envoyproxy/gateway/pulls?q=is%3Apr+label%3Acherrypick%2Frelease-v1.9.1+is%3Aclosed+sort%3Aupdated-desc

Which issue(s) this PR fixes:

Fixes #

kkk777-7 and others added 6 commits August 28, 2026 01:22
* Revert "chore: regen xds translator testdata for initialFetchTimeout (envoyproxy#9643)"

This reverts commit 4898608.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* Revert "fix: initial fetch timed out for type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret (envoyproxy#9532)"

This reverts commit 4ce3a07.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* regen: testdata output

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix gen

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Co-authored-by: zirain <zirain2009@gmail.com>
* change RateLimit cluster to EDS type

Signed-off-by: zirain <zirain2009@gmail.com>

* update test

Signed-off-by: zirain <zirain2009@gmail.com>

* release notes

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: zirain <zirain2009@gmail.com>
* feat: udp consistent hash

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix lint

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
…xy#9817)

* fix: honor access log text format when format.type is unset

ProxyAccessLogFormat.Type is optional: the CEL rule on the type only requires that
text or json is set when the type is omitted, so `format: {text: "..."}` is accepted
by the API server for any sink. The OpenTelemetry sink honors it, File and ALS did
not — both tested `format.Type != nil && *format.Type == Text` and fell through to
the JSON branch, where a nil format.JSON produced an empty field list and the
translator substituted the default JSON fields. The configured text format was
dropped with no error, no status condition and no log line.

Resolve the effective format type once, before the sink loop: an explicit type wins,
otherwise a text-only format resolves to Text and everything else to JSON. The File
and ALS sinks now branch on that. The no-sink default path, which built a JSON access
log on /dev/stdout regardless of format, has the same root cause and is fixed with it.

OpenTelemetry is deliberately left alone: it can carry text and attributes at the same
time and already handles the unset type itself.

The existing unit case "nil format type with text only uses text for file sink" from
envoyproxy#7720 asserted the JSON fallback its own name argues against; its expectation is
updated to the text access log.

Fixes envoyproxy#9719

Signed-off-by: Andrey Maltsev <maltsev.andrey@gmail.com>

* fix: keep JSON when an unset format type carries both text and json

The File and ALS sinks and the no-sink default path have always rendered JSON for
format: {text, json} with no type, and the API accepts that input. Inferring Text
from a non-nil text alone would silently switch those setups from structured JSON
to text and break downstream parsing, so infer Text only when json is absent.

Signed-off-by: Andrey Maltsev <maltsev.andrey@gmail.com>

---------

Signed-off-by: Andrey Maltsev <maltsev.andrey@gmail.com>
…oyproxy#9831)

* security: enable AES-256-GCM OAuth2 cookie encryption by default

Set envoy.reloadable_features.oauth2_use_gcm_encryption=true and
envoy.reloadable_features.oauth2_legacy_cbc_decrypt_compat=false in the
proxy bootstrap's global_config static layer, closing the padding oracle
in CVE-2026-47775 for OIDC users by default.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>

* docs: note that Replace bootstraps do not get the OAuth2 GCM guards

The guards live in the rendered default bootstrap, which spec.bootstrap
type Replace discards. Call that out in the release note so OIDC users
with a replacement bootstrap know to set them themselves.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
* watch namespace changes

Signed-off-by: zirain <zirain2009@gmail.com>

* fix lint

Signed-off-by: zirain <zirain2009@gmail.com>

* fix watch and update

Signed-off-by: zirain <zirain2009@gmail.com>

* remove log

Signed-off-by: zirain <zirain2009@gmail.com>

* fix lint

Signed-off-by: zirain <zirain2009@gmail.com>

* fix e2e

Signed-off-by: zirain <zirain2009@gmail.com>

* release notes

Signed-off-by: zirain <zirain2009@gmail.com>

* Distinguish namespace events before forcing translation

Signed-off-by: zirain <zirain2009@gmail.com>

* fix flaky

Signed-off-by: zirain <zirain2009@gmail.com>

* remove Force

Signed-off-by: zirain <zirain2009@gmail.com>

* fix lint

Signed-off-by: zirain <zirain2009@gmail.com>

* remvoe unless namespace check

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: zirain <zirain2009@gmail.com>
@kkk777-7
kkk777-7 requested a review from a team as a code owner August 27, 2026 16:47

@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: 17c41a55de

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

stillya and others added 8 commits August 28, 2026 02:04
…9764)

feat: list extension manager resources once per reconcile
Collect ext-GVK in populateExtensionResources and call it once per reconcile from processGateways.

Signed-off-by: stillya <st.ilya.101@gmail.com>
…ng (envoyproxy#9812)

* fix(metrics): widen watchable_subscribe_duration_seconds bucket spacing

Motivation:
watchable_subscribe_duration_seconds used buckets {0.001, 0.01, 0.1, 1,
5, 10}, with a 10x gap between 0.1 and 1 and a 5x gap between 1 and 5.
Because histogram_quantile interpolates within a bucket, a control
plane whose translations take ~2s puts every observation in (1, 5],
so p50/p95/p99 all read as flat somewhere in that range regardless of
whether the control plane is healthy or steadily degrading, until it
crosses the next boundary. A sub-second control plane has the same
problem in (0.1, 1].

Approach:
Adopt the bucket spacing already used and reviewed in this repo for
the k8s rest client latency histogram (rest_client_request_duration_seconds,
internal/metrics/restclient/metrics.go), extended with a trailing
120.0 bucket to keep the slow tail visible: {0.005, 0.025, 0.1, 0.25,
0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 30.0, 60.0, 120.0}. Reusing an
already-reviewed spacing avoids picking new numbers from scratch.

Bucket boundaries are a breaking change for any dashboard/alert
referencing the old le values (0.001, 1, 5 no longer exist), so this
adds a release note. The shipped Grafana panel for this metric
(charts/gateway-addons-helm/dashboards/envoy-gateway-global.json)
queries by le dynamically (legendFormat "{{le}}"), so it keeps working
unchanged with the new boundaries.

Out of scope: the issue also describes a watchable_depth gauge that's
always 0 (reads len() of an unbuffered channel). That part needs a
staged plan across the shipped Grafana dashboard (repoint a panel,
migrate two label_values queries, then decide deprecate vs. redefine)
and is left for a separate change. Two other histograms in this repo
(internal/provider/kubernetes/metrics.go's status_update_duration_seconds
and internal/infrastructure/kubernetes/metrics.go's
resource_apply_duration_seconds / resource_delete_duration_seconds)
have the same coarse buckets and were left untouched to keep this
change scoped to the exact metric named in the report.

Validation:
- go build ./internal/message/... ./internal/metrics/... (passed)
- go test ./internal/message/... ./internal/metrics/... (passed; no
  test in the repo pins specific bucket values for this histogram)
- golangci-lint run --config=tools/linter/golangci-lint/.golangci.yml
  ./internal/message/... ./internal/metrics/... (clean)
- bash tools/hack/check-release-notes-filenames.sh (passed)
- gh run list --repo envoyproxy/gateway --branch main --event push
  --limit 20: lint, gen-check, coverage-test, and build jobs are green
  on main; only some e2e/conformance jobs and OSV-Scanner are
  currently red on main itself, pre-existing and unrelated to this
  change.

Report: envoyproxy#9776
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5 (via Claude Code)

* docs(release-notes): correct removed histogram boundaries list

The note previously listed (0.001, 1, 5) as removed le boundaries, but
1.0 is still present in the new buckets while 0.01 and 10 were also
dropped. Update the note to list the actual removed set: 0.001, 0.01,
5, 10.

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>

* docs(release-notes): rework wording per reviewer suggestion

Adopt the clearer phrasing hsubramanianaks suggested: explicitly call
out that _sum/_count are unchanged, use le="..." notation for the
removed/retained bucket boundaries, and note that histogram_quantile()
queries don't need changes since they aggregate by le dynamically.

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>

---------

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
…ng controller (envoyproxy#9809)

* fix: skip backendResource watch when CRD is missing instead of crashing controller

When an extension manager declares backendResources pointing at a custom
CRD that is absent (or the controller SA lacks list/watch RBAC), the
informer's initial LIST fails, WaitForCacheSync times out, and the
controller crash-loops — taking down the entire gateway, not just the
routes using the custom backend.

This adds a checkCRD call before registering each backendResource watch,
following the same pattern already used for ServiceImport, Backend,
HTTPRouteFilter, and other optional CRDs. If the CRD is missing, the
watch is skipped with a warning log instead of failing cache sync.

Fixes envoyproxy#9807

Signed-off-by: Lucas Siedlarczyk <lucas.siedlarczyk@gmail.com>
* fix: make control plane trace more readable

Signed-off-by: zirain <zirain2009@gmail.com>

* update

Signed-off-by: zirain <zirain2009@gmail.com>

* make sure that span end on panic

Signed-off-by: zirain <zirain2009@gmail.com>

* record queue wait ms

Signed-off-by: zirain <zirain2009@gmail.com>

* fix

Signed-off-by: zirain <zirain2009@gmail.com>

* [observability] Add a dedicated span for EnvoyPatchPolicy JSON patch processing

JSON patch processing can dominate the xDS translation time when a cluster
has many EnvoyPatchPolicies or expensive patches, but today it is hidden
inside the Translator.Translate span, so there is no way to tell how much of
a multi-second translation is spent applying patches.

Start a Translator.processJSONPatches child span, recording the number of
policies and how many patches were applied, targeted a missing resource, or
failed. The span is only started when the xDS IR actually carries
EnvoyPatchPolicies.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix context

Signed-off-by: zirain <zirain2009@gmail.com>

* fix review comments

Signed-off-by: zirain <zirain2009@gmail.com>

* add trace link

Signed-off-by: zirain <zirain2009@gmail.com>

* nit

Signed-off-by: zirain <zirain2009@gmail.com>

* apply huabing's change

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
* fix: keep orphaned OIDC PKCE cookies off every request

Envoy mints a nonce (CSRF) and a PKCE code verifier cookie for every
authorization flow it starts, keyed by a random per-flow id so that several
logins can be in flight at once. On a successful callback it deletes only the
pair belonging to the flow that completed, which is deliberate - sweeping every
flow would strip the cookies of the other tabs still mid-login. A flow that is
started and abandoned therefore leaves its pair behind until it expires, and at
the default path "/" those orphans are sent on every request. Combined with a
provider that issues large id and access tokens they overflow the inbound
request header limit, at which point the callback itself fails and the browser
loops back through the flow, minting yet another pair.

Envoy only needs the value of these two cookies when it validates the
callback, so scope them to the OIDC redirect path. Orphans then stay off
ordinary application requests instead of counting against the header limit on
each one. This bounds the problem rather than eliminating it - they are still
sent to the callback endpoint, and they still expire on their own within
csrfTokenTTL.

Also name the code verifier cookie CodeVerifier-<suffix>. It was the only one
of the seven OAuth2 cookies left at Envoy's default name, so SecurityPolicies
sharing a cookie domain all wrote one shared cookie, and logging out of one
policy deleted the in-flight flow cookies of the others.

The redirect path is only applied when it satisfies the pattern Envoy enforces
on a cookie path, which is stricter than a URL path - "," and ";" for example
are legal RFC 3986 sub-delims but are rejected. An unrepresentable path falls
back to leaving the cookie path unset, which Envoy defaults to "/", rather
than failing xDS validation and dropping the route.

Fixes envoyproxy#9632

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>

* test: make the OIDC e2e client path-aware

The e2e cookie tracker replayed every stored cookie on every request, keyed by
name alone. That made it blind to the cookie path, so the scoping this change
relies on could regress without any test noticing, and cookies with the same
name at two different paths overwrote each other.

Track cookies by name and path, honour the RFC 6265 path-match rules when
deciding what to send, and drop cookies the server expires. It is deliberately
still not a net/http/cookiejar: the OAuth2 filter marks every cookie "secure"
and these tests run over plain HTTP, so a spec-compliant jar would store the
cookies and then never send them back.

With that in place, assert that an authorization flow which has been started
but not completed - the state an abandoned flow leaves behind - keeps its nonce
and code verifier cookies off ordinary application requests.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>

---------

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
…roxy#9768)

fix(listenerset): preserve routes on conflict winner

Signed-off-by: Theis Ferré Hjortkjær <daetfh@egmont.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7
kkk777-7 force-pushed the cherry-pick-v1.9.1 branch from 17c41a5 to 2d0f84e Compare August 27, 2026 17:05
@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.58333% with 122 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.46%. Comparing base (d603903) to head (2d0f84e).
⚠️ Report is 5 commits behind head on release/v1.9.

Files with missing lines Patch % Lines
internal/message/types.go 35.55% 25 Missing and 4 partials ⚠️
internal/infrastructure/runner/runner.go 4.54% 20 Missing and 1 partial ⚠️
internal/provider/kubernetes/controller.go 64.40% 16 Missing and 5 partials ⚠️
internal/provider/kubernetes/predicates.go 42.85% 15 Missing and 5 partials ⚠️
internal/gatewayapi/runner/runner.go 65.51% 10 Missing ⚠️
internal/gatewayapi/listener.go 63.63% 6 Missing and 2 partials ⚠️
internal/gatewayapi/resource/resource.go 58.33% 3 Missing and 2 partials ⚠️
internal/provider/kubernetes/routes.go 71.42% 2 Missing and 2 partials ⚠️
internal/gatewayapi/globalresources.go 93.33% 1 Missing and 1 partial ⚠️
internal/xds/translator/globalresources.go 95.00% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@               Coverage Diff                @@
##           release/v1.9    #9872      +/-   ##
================================================
+ Coverage         76.30%   76.46%   +0.16%     
================================================
  Files               261      262       +1     
  Lines             44351    44796     +445     
================================================
+ Hits              33841    34255     +414     
+ Misses             8273     8271       -2     
- Partials           2237     2270      +33     

☔ 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 commented Aug 28, 2026

Copy link
Copy Markdown
Member

/retest

@zirain
zirain merged commit c30c739 into envoyproxy:release/v1.9 Aug 28, 2026
79 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants