Skip to content

Deflake test //test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test - #47390

Merged
ravenblackx merged 1 commit into
envoyproxy:mainfrom
ravenblackx:deflake_ext_proc_observ
Sep 11, 2026
Merged

ravenblackx merged 1 commit into
envoyproxy:mainfrom
ravenblackx:deflake_ext_proc_observ

Conversation

@ravenblackx

Copy link
Copy Markdown
Contributor

Commit Message: Deflake test //test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
(flaky failure)

  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"

finishGrpcStream() only queues the gRPC trailers. In observability mode, the main request proceeds independently and could complete first. The logging filter then inspected the side-stream StreamInfo before its response headers had been processed, so via_upstream had not yet been assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

@repokitteh-read-only

Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #47390 was opened by ravenblackx.

see: more, trace.

@tyxia tyxia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@ravenblackx
ravenblackx merged commit 43c353c into envoyproxy:main Sep 11, 2026
25 checks passed
@ravenblackx
ravenblackx deleted the deflake_ext_proc_observ branch September 14, 2026 14:20
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 9, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 12, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 13, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 13, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 15, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race #47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft #47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 15, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 16, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 17, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race #47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft #47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 17, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 17, 2026
…bility_integration_test (#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit that referenced this pull request Nov 17, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race #47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft #47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…bility_integration_test (envoyproxy#47390)

Commit Message: Deflake test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
Additional Description:
([flaky
failure](https://github.com/envoyproxy/envoy/actions/runs/34641194427/job/103401038646#annotation:20:4227))
```
  [ RUN      ] IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.ObservabilityModeWithLoggingCloseStream/2
  test/extensions/filters/http/ext_proc/logging_test_filter.cc:47: Failure
  Expected equality of these values:
    ext_proc_logging_info->httpResponseCodeDetails()
      Which is: ""
    expected_rcd_
      Which is: "via_upstream"
```
finishGrpcStream() only queues the gRPC trailers. In observability mode,
the main request proceeds independently and could complete first. The
logging filter then inspected the side-stream StreamInfo before its
response headers had been processed, so via_upstream had not yet been
assigned.

AI assisted with Codex Sol.
Risk Level: test-only
Testing: yes
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Raven Black <[email protected]>

Use `testing::Ge`, as this branch has no using-declaration for it.

(cherry picked from commit 43c353c)
Signed-off-by: Ryan Northey <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 18, 2026
In observability mode the main request doesn't wait for the ext_proc
side stream. The test has the fake ext_proc server send its response
headers and then has the main upstream answer straight away, from a
different thread on a different socket, so Envoy can finish the main
response first. The logging test filter then reads the side stream's
response code details as `""` instead of `"via_upstream"`
(`logging_test_filter.cc:47`).

This waits for `cluster.ext_proc_server_0.upstream_rq_200` before
answering the main request, since the router charges it in the same
callback that sets `via_upstream`. It's the same race envoyproxy#47390 fixed for
the `CloseStream` variant.

Additional Description:
Over the last 30 days of Envoy/Checks this failed on 9 changes (3 main
postsubmit, 4 release/v1.39 postsubmit, 2 unrelated PRs) on OpenSSL,
Coverage, asan and Compile time options, always on the Envoy gRPC params
`/0` and `/2`. Draft envoyproxy#47626 waits on the same counter, but after
`handleUpstreamRequest()`, which is too late to order the two, and with
the removed `waitForCounterGe`.

To force the ordering locally, I posted a 1s sleep onto the fake
ext_proc connection's thread just before `startGrpcStream()`. Without
the fix, `/0` and `/2` failed on every run with the CI message, and `/1`
and `/3` passed. With the fix and the sleep, every run passed.

AI Disclosure: code change created with AI assistance, fully reviewed by
me prior to opening.

Risk Level: Low (test only)
Testing:
- forced-ordering repro above: 6/6 failures before, 0 after
- `bazel test
//test/extensions/filters/http/ext_proc:ext_proc_observability_integration_test
--test_filter='*ObservabilityModeWithLogging/*' --runs_per_test=20`:
80/80 pass (macOS arm64, fastbuild)
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Derek Argueta <[email protected]>
(cherry picked from commit 02153b3)
Signed-off-by: Ryan Northey <[email protected]>
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.

3 participants