Repository navigation
test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain - #49318
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-only drain-timeout adjustment.
No open issues 🎉
What changed in this PR
This test-only change addresses a recurring default-filter-chain update flake by preventing the old connection’s drain deadline from interrupting a second client’s TLS handshake.
Changes:
- Sets this test’s drain timeout to 600 seconds before initialization.
- Adds a comment explaining how an early connection close can interrupt the shared dispatcher’s connect wait.
| File | Description |
|---|---|
test/integration/xds_integration_test.cc |
Extends the drain timeout for ReloadConfigUpdatingDefaultFilterChain and documents the timing hazard. |
Review effort: Balanced
…gDefaultFilterChain The test opens a client on the default filter chain, updates the default filter chain via LDS, connects a second client and only then sends a request on the first. The replaced filter chain is hard-closed after drainTime() (1s in integration tests). When the second client's TLS handshake runs past that, the first client's RemoteClose exits the shared dispatcher while makeHttpConnection() waits, so the new client reports connected() == false and the following request on the closed client asserts. Use a drain time that the test cannot outrun. The test never waits for the drained filter chain to be removed. Signed-off-by: Ryan Northey <[email protected]>
phlax
force-pushed
the
fix-lds-default-chain-flake
branch
from
November 16, 2026 10:34
4960e1a to
f8f0aeb
Compare
ravenblackx
approved these changes
Nov 16, 2026
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 16, 2026
…gDefaultFilterChain (envoyproxy#49318) Commit Message: test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain Additional Description: The test runs in this order: 1. It opens a client on the default filter chain. 2. It replaces that filter chain via LDS. 3. It connects a second client. 4. Only then does it send a request on the first client. The replaced chain is hard-closed `drainTime()` (1s in integration tests) after the update. Under tsan, the second client's TLS handshake can run past that deadline. When it does: - The first client's `RemoteClose` lands on the shared dispatcher, and `IntegrationCodecClient` exits the dispatcher on it. - `makeHttpConnection()` therefore returns before the second client has connected, so `connected()` is false. - The next request on the closed first client then asserts on `state() == Open`. Example: https://github.com/envoyproxy/envoy/actions/runs/43830092397/job/133173181415 The fix gives this test a drain time it cannot outrun. It never waits for the drained chain to be removed. envoyproxy#48634 fixed the same hazard in `expectResponseHeaderConnectionClose`. Risk Level: Low (test only) Testing: tsan deflake on envoy-ci-staging, filtered to this test. | | main | this PR | |---|---|---| | forced (1.5s sleep before the second connect) | 20/20 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846075670)) | 20/20 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846095251)) | | natural | 2/500 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846114293)) | 500/500 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846133288)) | Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Previously reported (closed): envoyproxy#29842, envoyproxy#31803, envoyproxy#33250, envoyproxy#38264, envoyproxy#44744 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 16, 2026
…gDefaultFilterChain (envoyproxy#49318) Commit Message: test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain Additional Description: The test runs in this order: 1. It opens a client on the default filter chain. 2. It replaces that filter chain via LDS. 3. It connects a second client. 4. Only then does it send a request on the first client. The replaced chain is hard-closed `drainTime()` (1s in integration tests) after the update. Under tsan, the second client's TLS handshake can run past that deadline. When it does: - The first client's `RemoteClose` lands on the shared dispatcher, and `IntegrationCodecClient` exits the dispatcher on it. - `makeHttpConnection()` therefore returns before the second client has connected, so `connected()` is false. - The next request on the closed first client then asserts on `state() == Open`. Example: https://github.com/envoyproxy/envoy/actions/runs/43830092397/job/133173181415 The fix gives this test a drain time it cannot outrun. It never waits for the drained chain to be removed. envoyproxy#48634 fixed the same hazard in `expectResponseHeaderConnectionClose`. Risk Level: Low (test only) Testing: tsan deflake on envoy-ci-staging, filtered to this test. | | main | this PR | |---|---|---| | forced (1.5s sleep before the second connect) | 20/20 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846075670)) | 20/20 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846095251)) | | natural | 2/500 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846114293)) | 500/500 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846133288)) | Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Previously reported (closed): envoyproxy#29842, envoyproxy#31803, envoyproxy#33250, envoyproxy#38264, envoyproxy#44744 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
that referenced
this pull request
Nov 17, 2026
…gDefaultFilterChain (#49318) Commit Message: test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain Additional Description: The test runs in this order: 1. It opens a client on the default filter chain. 2. It replaces that filter chain via LDS. 3. It connects a second client. 4. Only then does it send a request on the first client. The replaced chain is hard-closed `drainTime()` (1s in integration tests) after the update. Under tsan, the second client's TLS handshake can run past that deadline. When it does: - The first client's `RemoteClose` lands on the shared dispatcher, and `IntegrationCodecClient` exits the dispatcher on it. - `makeHttpConnection()` therefore returns before the second client has connected, so `connected()` is false. - The next request on the closed first client then asserts on `state() == Open`. Example: https://github.com/envoyproxy/envoy/actions/runs/43830092397/job/133173181415 The fix gives this test a drain time it cannot outrun. It never waits for the drained chain to be removed. #48634 fixed the same hazard in `expectResponseHeaderConnectionClose`. Risk Level: Low (test only) Testing: tsan deflake on envoy-ci-staging, filtered to this test. | | main | this PR | |---|---|---| | forced (1.5s sleep before the second connect) | 20/20 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846075670)) | 20/20 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846095251)) | | natural | 2/500 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846114293)) | 500/500 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846133288)) | Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Previously reported (closed): #29842, #31803, #33250, #38264, #44744 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…gDefaultFilterChain (envoyproxy#49318) Commit Message: test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain Additional Description: The test runs in this order: 1. It opens a client on the default filter chain. 2. It replaces that filter chain via LDS. 3. It connects a second client. 4. Only then does it send a request on the first client. The replaced chain is hard-closed `drainTime()` (1s in integration tests) after the update. Under tsan, the second client's TLS handshake can run past that deadline. When it does: - The first client's `RemoteClose` lands on the shared dispatcher, and `IntegrationCodecClient` exits the dispatcher on it. - `makeHttpConnection()` therefore returns before the second client has connected, so `connected()` is false. - The next request on the closed first client then asserts on `state() == Open`. Example: https://github.com/envoyproxy/envoy/actions/runs/43830092397/job/133173181415 The fix gives this test a drain time it cannot outrun. It never waits for the drained chain to be removed. envoyproxy#48634 fixed the same hazard in `expectResponseHeaderConnectionClose`. Risk Level: Low (test only) Testing: tsan deflake on envoy-ci-staging, filtered to this test. | | main | this PR | |---|---|---| | forced (1.5s sleep before the second connect) | 20/20 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846075670)) | 20/20 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846095251)) | | natural | 2/500 fail ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846114293)) | 500/500 pass ([run](https://github.com/envoyproxy/envoy-ci-staging/actions/runs/43846133288)) | Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A Previously reported (closed): envoyproxy#29842, envoyproxy#31803, envoyproxy#33250, envoyproxy#38264, envoyproxy#44744 Signed-off-by: Ryan Northey <[email protected]> (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…gDefaultFilterChain (envoyproxy#49318) The test opens a client on the default filter chain, updates the default filter chain via LDS, connects a second client and only then sends a request on the first. The replaced filter chain is hard-closed after drainTime() (1s in integration tests). When the second client's TLS handshake runs past that, the first client's RemoteClose exits the shared dispatcher while makeHttpConnection() waits, so the new client reports connected() == false and the following request on the closed client asserts. Use a drain time that the test cannot outrun. The test never waits for the drained filter chain to be removed. (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 17, 2026
…gDefaultFilterChain (envoyproxy#49318) The test opens a client on the default filter chain, updates the default filter chain via LDS, connects a second client and only then sends a request on the first. The replaced filter chain is hard-closed after drainTime() (1s in integration tests). When the second client's TLS handshake runs past that, the first client's RemoteClose exits the shared dispatcher while makeHttpConnection() waits, so the new client reports connected() == false and the following request on the closed client asserts. Use a drain time that the test cannot outrun. The test never waits for the drained filter chain to be removed. (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
that referenced
this pull request
Nov 17, 2026
…gDefaultFilterChain (#49318) The test opens a client on the default filter chain, updates the default filter chain via LDS, connects a second client and only then sends a request on the first. The replaced filter chain is hard-closed after drainTime() (1s in integration tests). When the second client's TLS handshake runs past that, the first client's RemoteClose exits the shared dispatcher while makeHttpConnection() waits, so the new client reports connected() == false and the following request on the closed client asserts. Use a drain time that the test cannot outrun. The test never waits for the drained filter chain to be removed. (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
phlax
added a commit
to phlax/envoy
that referenced
this pull request
Nov 18, 2026
…gDefaultFilterChain (envoyproxy#49318) The test opens a client on the default filter chain, updates the default filter chain via LDS, connects a second client and only then sends a request on the first. The replaced filter chain is hard-closed after drainTime() (1s in integration tests). When the second client's TLS handshake runs past that, the first client's RemoteClose exits the shared dispatcher while makeHttpConnection() waits, so the new client reports connected() == false and the following request on the closed client asserts. Use a drain time that the test cannot outrun. The test never waits for the drained filter chain to be removed. (cherry picked from commit 9ee2de5) Signed-off-by: Ryan Northey <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: test: deflake LdsInplaceUpdateHttpIntegrationTest.ReloadConfigUpdatingDefaultFilterChain
Additional Description:
The test runs in this order:
The replaced chain is hard-closed
drainTime()(1s in integration tests) after the update. Under tsan, the second client's TLS handshake can run past that deadline. When it does:RemoteCloselands on the shared dispatcher, andIntegrationCodecClientexits the dispatcher on it.makeHttpConnection()therefore returns before the second client has connected, soconnected()is false.state() == Open.Example: https://github.com/envoyproxy/envoy/actions/runs/43830092397/job/133173181415
The fix gives this test a drain time it cannot outrun. It never waits for the drained chain to be removed. #48634 fixed the same hazard in
expectResponseHeaderConnectionClose.Risk Level: Low (test only)
Testing: tsan deflake on envoy-ci-staging, filtered to this test.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
Previously reported (closed): #29842, #31803, #33250, #38264, #44744