Align AuTests with latest proxy-verifier checks - #12986
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates multiple Proxy Verifier replay-based gold tests to reduce redundant proxy-request expectations and to split out dedicated origin-server replay files for tests that use different client vs server behaviors (notably traffic_dump, ja4_fingerprint, escalate, and cookie remap scenarios). Overall, this keeps the tests focused on the assertions that actually matter for each scenario (e.g., “should not hit origin”) and makes server-side expectations explicit where needed.
Changes:
- Remove redundant
proxy-requestblocks (often simple<<: *base-reqmerges) from various replay YAMLs. - Add new dedicated “server replay” YAMLs and update tests to use them for origin processes (e.g.,
traffic_dump,ja4_fingerprint,escalate, cookie remap). - Expand cache-hit “must not reach origin” assertions for normalized Accept-Encoding + Vary cache matching.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/pluginTest/txn_box/static_file/static_file.replay.yaml | Remove redundant proxy-request merges from transactions. |
| tests/gold_tests/pluginTest/txn_box/prod/yts-3489.replay.yaml | Remove redundant proxy-request merges from transactions. |
| tests/gold_tests/pluginTest/txn_box/prod/stanley.replay.yaml | Remove redundant proxy-request merges and trailing blank line. |
| tests/gold_tests/pluginTest/txn_box/prod/ip-acl.replay.yaml | Remove redundant proxy-request merges and trailing blank line. |
| tests/gold_tests/pluginTest/txn_box/prod/cors-referrer.replay.yaml | Remove redundant proxy-request blocks and trailing blank line. |
| tests/gold_tests/pluginTest/txn_box/prod/cors-origin.replay.yaml | Remove redundant proxy-request blocks and trailing blank line. |
| tests/gold_tests/pluginTest/txn_box/basic/reply.replay.yaml | Remove redundant proxy-request merges from transactions. |
| tests/gold_tests/pluginTest/txn_box/basic/redirect.replay.yaml | Remove redundant proxy-request merges from transactions. |
| tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py | Point origin process at a new dedicated server replay YAML. |
| tests/gold_tests/pluginTest/traffic_dump/traffic_dump_ip_filter.test.py | Point origin process at a new dedicated IP-filter server replay YAML. |
| tests/gold_tests/pluginTest/traffic_dump/replay/traffic_dump_server.yaml | New: dedicated origin-server replay for traffic_dump scenarios. |
| tests/gold_tests/pluginTest/traffic_dump/replay/traffic_dump_ip_filter_server.yaml | New: minimal origin-server replay for IP filter test. |
| tests/gold_tests/pluginTest/ja4_fingerprint/ja4_fingerprint.test.py | Allow server replay selection based on --preserve usage. |
| tests/gold_tests/pluginTest/ja4_fingerprint/ja4_fingerprint_basic_server.replay.yaml | New: basic server-side expectations for non-preserve runs. |
| tests/gold_tests/pluginTest/escalate/escalate.test.py | Switch to dedicated origin/failover server replay YAMLs. |
| tests/gold_tests/pluginTest/escalate/escalate_original_server_default.replay.yaml | New: server replay for default escalate behavior. |
| tests/gold_tests/pluginTest/escalate/escalate_failover_server_default.replay.yaml | New: failover server replay for default escalate behavior. |
| tests/gold_tests/pluginTest/escalate/escalate_original_server_non_get.replay.yaml | New: server replay for non-GET escalation scenarios. |
| tests/gold_tests/pluginTest/escalate/escalate_failover_server_non_get.replay.yaml | New: failover server replay for non-GET escalation scenarios. |
| tests/gold_tests/pluginTest/cookie_remap/disable_pristine_host_hdr.test.py | Use separate server replay YAMLs for canary vs stable validation. |
| tests/gold_tests/pluginTest/cookie_remap/disable_pristine_host_hdr_server_canary_true.replay.yaml | New: canary server replay when pristine host header is disabled. |
| tests/gold_tests/pluginTest/cookie_remap/disable_pristine_host_hdr_server_canary_false.replay.yaml | New: canary server replay when pristine host header is preserved. |
| tests/gold_tests/pluginTest/cookie_remap/disable_pristine_host_hdr_server_stable.replay.yaml | New: stable server replay expectations. |
| tests/gold_tests/headers/replays/normalized_ae_varied_transactions.replay.yaml | Remove proxy-request expectations from cache-hit transactions. |
| tests/gold_tests/headers/normalized_ae_match_vary_cache.test.py | Add “server must not see uuid” assertions for additional cache-hit cases. |
| tests/gold_tests/h2/replay_rst_stream/http2_rst_stream_client_after_headers.yaml | Remove proxy-side content validation blocks. |
| tests/gold_tests/h2/replay_rst_stream/http2_rst_stream_client_after_data.yaml | Remove proxy-side content validation blocks. |
| tests/gold_tests/h2/http2_close_connection.yaml | Remove proxy-response content validation block. |
| tests/gold_tests/h2/http2_flow_control.test.py | Use an empty “no origin” replay when policy value is malformed. |
| tests/gold_tests/h2/http2_flow_control_no_origin.yaml | New: empty replay (no sessions) for malformed policy test setup. |
| tests/gold_tests/cache/replay/varied_transactions.replay.yaml | Remove proxy-request expectation from a cache-hit transaction. |
| tests/gold_tests/cache/replay/cache-read-retry.replay.yaml | Remove proxy-request expectations from cache-hit/concurrent read transactions. |
You can also share your feedback on Copilot code review. Take the survey.
The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed.
c84d24a to
98d75f3
Compare
The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed. (cherry picked from commit ecf505c)
|
10.2.x backport: |
The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed. (cherry picked from commit ecf505c)
|
Added to milestone 10.2.0 via #13020 |
The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed. (cherry picked from commit ecf505c)
* curl 8.20 test update: curl PROXY destination changes (#13239) curl 8.20 intentionally mirrors --haproxy-clientip into both PROXY addresses to keep the header address family consistent. The TSVConnPPInfo AuTest still expected the older destination address, so jobs with newer curl failed even though ATS preserved the PROXY metadata it received. This relaxes the destination-address expectation to accept either curl behavior while continuing to verify the source address and PROXY metadata. This also wraps the long curl command strings while leaving the test's request flow unchanged. (cherry picked from commit ad0ce02) * fedora:44: Trim remap ACL reload waits (#13237) The remap ACL AuTests run hundreds of reload scenarios in a single case, and the Fedora 44 shard is sensitive to extra reload-wait overhead, causing the tests to hang. Their reload sentinel also counted only explicit reloads, even though the log contains the startup load marker too. This replaces the long-lived sleep Ready helper with a short command that exits once the expected reload marker count is present. This also waits for the startup marker plus the explicit reload count, so each scenario observes the reload it just requested. (cherry picked from commit c52eeda) * Align AuTests with latest proxy-verifier checks (#12986) The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed. (cherry picked from commit ecf505c) * Fix 10.1.x PV replay expectations Adjust two replay expectations after backporting the proxy-verifier 3.1 cleanup. The 10.1.x branch has fewer escalate transactions, and duplicate header checks now observe the combined header value. * [autest] thread_config: add startup polling and skip test on non-Linux (#12940) * thread_config: add startup polling for thread checks and skip on non-Linux check_threads.py now uses a short bounded poll/retry window so thread-count validation does not fail on startup races; the test is also skipped on non-Linux platforms because per-thread introspection used by this check is not reliably available there. * thread_config: stop retrying when Process.threads() access is denied (cherry picked from commit 6dfaadd) * Fix flaky autests for timeout, sigusr2, and thread_config (#13012) * Handle SIGPIPE in ssl-delay-server to prevent helper death when a client disconnects during TLS handshake delay. * Retry accept() on EINTR under heavy parallel load instead of treating the interruption as a fatal error. * Fix accept() error check to use < 0 instead of <= 0 since fd 0 is a valid descriptor when stdin is closed. * Add cmdline matching fallback in check_threads.py for ASAN where the process CWD differs from expected ts_path. (cherry picked from commit ff31470) * Fix 10.1.x JA4 AuTest setup Initialize the branch-local JA4 test helper's preserve flag after backporting replay changes from master. Without it the test fails during Python load before the actual replay runs. * Proxy Verifier: use concise stack protocol specification (#13003) Proxy Verifier v3.0.0 has a more concise `stack` configurable for `protocol` specification. This makes use of that over the more verbose full `protocol` sequence. * tests/gold_tests/headers tests: use ATSReplayTest (#13033) Move the replay-friendly headers gold tests to ATSReplayTest wrappers and describe their ATS, origin, and client setup in replay YAML. This keeps the cache, range, redirect, HSTS, and alternate handling coverage while making the tests easier to read and maintain, and removes the old gold files left orphaned by the conversion. (cherry picked from commit 49cb7c8) * Adapt headers replay tests for 10.1.x --------- Co-authored-by: bneradt <bneradt@yahooinc.com> Co-authored-by: Mo Chen <mochen@apache.org> Co-authored-by: Bryan Call <bcall@apache.org>
The latest proxy-verifier now fails a run when a verifier server or
client is given proxy-side checks for traffic that ATS never produces.
Most tests only needed stale proxy-request or proxy-response nodes
removed, but the shared replay cases below need server-specific files
so each verifier only owns traffic it can actually observe.
the canary server on uuid 1 when pristine_host_hdr stays enabled.
canary server on uuid 1 when the Host header is rewritten.
stable server on uuid 2, which the canary server never receives.
requests that the default-mode origin server really handles.
requests that default-mode escalation sends to failover.
subset when --escalate-non-get-methods is enabled.
subset, including the escalated HEAD request in that mode.
test to its one real request instead of preserve-only checks.
sessions that really reach origin in the main traffic_dump test.
used by the traffic_dump IP filter test.
These per-server replays preserve fallback server-response directives
and client-side coverage while dropping only the proxy-side checks
that latest proxy-verifier now correctly reports as unprocessed.