Repository navigation
Backport Uranium tests to 10.2.x - #13889
Conversation
|
[approve ci autest 1] |
bryancall
left a comment
There was a problem hiding this comment.
❌ Request changes
Nice work getting this onto 10.2.x so quickly. I checked it mainly for what a backport can lose, and it holds up well. Two things need to change before it merges.
Still blocking: AuTest 1of4 is red
Shard 1 failed on both runs against 58ee243 (builds 45778 and 45801). The same shard passed on every other recent PR I checked, including #13888 on 10.2.x, so I don't think this is the usual flake. The Jenkins console isn't public, so I can't tell which test failed.
Blocking: ENABLE_AUTEST now fails configure on a release branch
CMakeLists.txt:166 stops configure with FATAL_ERROR whenever ENABLE_AUTEST is defined, even when it's OFF. The old option(ENABLE_AUTEST ...) wrote that variable into every existing CMakeCache.txt. That means any 10.2.x build directory created before this change stops configuring after the next point release. So does any packaging script that passes -DENABLE_AUTEST=OFF, which is what our own contrib/docker/ubuntu/noble/Dockerfile did until this PR. The same goes for the autest* preset names, which were renamed with no alias.
That's fine on master, but a patch release shouldn't break existing build commands. Could this fail only when the option is ON, or map it to ENABLE_URTEST with a deprecation warning? Keeping the old preset names as aliases would cover the rest.
Non-blocking: mention the ConnectingEntry change in the description
The changes to ConnectingEntry.h, ConnectingEntry.cc and the one line in HttpSM.cc change runtime behavior: the connecting entry now owns the outbound connection tracking reservation. I traced this to #13545 on master and it looks like a real fix. On a release branch, though, it should be called out in the description, or split into its own backport, so it doesn't ride along unnoticed in a test PR.
Non-blocking: cache_volume_features.test.yaml checks nothing about volumes
The header comment says per-volume settings "are verified via the metric_checks below", but there is no metric_checks block. As written, the test passes even if ATS ignores ram_cache_size, ramcache=false or avg_obj_size. The old 10.2.x AuTest had the same gap. Master's version of this file has the three checks, and the metrics they read exist on 10.2.x, so they should port over. Expect different numbers, since the volume sizes differ here.
Verified: coverage carried over
I mapped all 587 AuTest files on 10.2.x to the new tests. None is missing. The one test that only existed on 10.2.x (ssl_multicert_parallel_loading) is ported faithfully. Every test dropped relative to master covers a feature or fix that isn't on 10.2.x. Where 10.2.x behaves differently, such as TLS session caching, binary log v2 and ssl_multicert.config, the tests check the 10.2.x behavior, and the backport adds no new skips. I didn't run the suite locally.
38bdb76 to
e9d4db1
Compare
|
Thanks, Bryan. Addressed in e9d4db1:
Local validation passed: build/install, formatting, 125 framework tests, a real configure using the old autest preset and OFF options, the volume replay, and ten consecutive HTTP/2 content-length test runs. The updated revision is pushed for CI. |
bryancall
left a comment
There was a problem hiding this comment.
❌ Request changes
I reviewed 58ee243591..ae5950a32c (7 files, +207/-25, same base 6b3169f388). That covers your CMake, preset and test changes in e9d4db12d5 and the sandbox fix in ae5950a32c. On hera I built e9d4db12d5, ran the changed tests and CI shards 1 and 2, and ran a configure matrix from build trees created by the 10.2.x base. ae5950a32c changes only tests/tools/uranium/tests/test_plugin.py, so the CMake results below still apply; CMakeLists.txt is byte-identical (sha256 c7d978dcffde22b6). Thanks for the quick turnaround. The volume test fix in particular is a real improvement.
Fixed: old build trees with ENABLE_AUTEST=OFF
Reconfiguring a tree created at the base now works, and so does a fresh configure with -DENABLE_AUTEST=OFF. Both exited 0 on hera.
Fixed: cache_volume_features.test.yaml now checks the volumes
It passes at the head. With the storage 512M lines removed, it fails, so the new metric_checks really do catch volumes that were never created. I also worked through 66424 from the 10.2.x sizing code and got the same number.
Fixed: AuTest 1of4 and 2of4
All 14 checks are green on ae5950a32c. The nested pytest run in test_plugin.py now gets its own sandbox instead of the CI one. I didn't rerun test_plugin.py myself.
Still blocking: cmake --preset autest on an existing build-autest tree
Still present at ae5950a32c. A tree configured with cmake --preset autest at the base caches ENABLE_AUTEST:BOOL=ON, AUTEST_SANDBOX and AUTEST_OPTIONS. Rerunning cmake --preset autest on that tree at your head maps ENABLE_AUTEST correctly, then exits 1 at CMakeLists.txt:797 with "AUTEST_SANDBOX, AUTEST_OPTIONS, and PYTEST_OPTIONS were removed". The preset you restored points at that same build-autest directory, so anyone who used it on 10.2.x hits this on their next configure. As a check, I added unset(AUTEST_SANDBOX CACHE) and unset(AUTEST_OPTIONS CACHE) just before line 797 (sha256 e08b878893660f79). The same tree then configured cleanly with ENABLE_URTEST:BOOL=ON.
What would change my mind: migrate AUTEST_SANDBOX and AUTEST_OPTIONS to the URTEST_ names in cmake/UraniumOptions.cmake, with the same deprecation message as ENABLE_AUTEST, then drop the old cache entries. A test in test_build_compatibility.py that configures from a cache seeded with those old entries would catch any regression here. The current test runs UraniumOptions.cmake on its own under cmake -P, so it can't see CMakeLists.txt:797.
Non-blocking: -DENABLE_AUTEST=ON is ignored on an already-configured tree
On hera, a tree configured with no flags stays at ENABLE_URTEST:BOOL=OFF after cmake -B <dir> -DENABLE_AUTEST=ON. The deprecation warning prints, but nothing else changes. option() caches ENABLE_URTEST on the first run, so the NOT DEFINED guard at cmake/UraniumOptions.cmake:22 never fires again. A fresh tree with the same flag gets ON. Migrating once and then calling unset(ENABLE_AUTEST CACHE) fixes this. It also stops the two deprecation warnings that every old tree now prints on every reconfigure, since every base tree has both old options cached.
Non-blocking: the autest build targets have no aliases
The base tests/README.md:28 documents cmake --build build -t autest, and tests/CMakeLists.txt defined autest, autest_no_install and autest-uds. The new autest build preset covers cmake --build --preset autest, but -t autest now fails as an unknown target. Alias targets that depend on the urtest ones would close that gap.
Non-blocking: which test covers the connection tracking fix?
The description says "The converted connection-limit tests exercise this production behavior." The ConnectingEntry path only runs for a multiplexed (HTTP/2) origin (src/proxy/http/HttpSM.cc:6116). None of the 15 tests that set per_server.connection configures an origin ALPN, so I don't think any of them reaches it. If I missed one, please name it. Otherwise please drop the sentence.
Verified: the HTTP/2 content-length client change
test_http2_content_length_validation.py passes on hera. Waiting for the SETTINGS exchange before sending can't hang, because of the 5 second socket timeout at h2_content_length_client.py:127. The rejection assertions are unchanged.
ae5950a to
88b2f1a
Compare
|
Addressed the latest review in 88b2f1a (migration commit 22c2179):
Validation: 15 compatibility checks passed, including actual configure; framework suite 128 passed with the opt-in test skipped in that separate run. Formatting, incremental build, installation, and Sphinx docs passed. Thank you for testing the existing-build upgrade path. |
bryancall
left a comment
There was a problem hiding this comment.
❌ Request changes
I reviewed ae5950a32c..88b2f1a05c (5 files, +107/-18, same base 6b3169f388). git range-diff shows only the first commit changed. On hera I configured trees at the base, checked out your head and reconfigured them. Thanks for the quick turnaround. All four of my asks are done, but forcing the migration broke the reverse case.
Fixed: cmake --preset autest on an existing build-autest tree
A tree configured at the base with cmake --preset autest now reconfigures at your head with exit 0. The cache ends with ENABLE_URTEST:BOOL=ON, URTEST_SANDBOX and URTEST_OPTIONS, and no ENABLE_AUTEST* or AUTEST_* entries. A second run also exits 0 with no deprecation warnings. test_existing_autest_build_configures passed on hera against a real tree.
Fixed: -DENABLE_AUTEST=ON on an already-configured tree
A tree configured at your head with no flags, and one configured at the base, both end with ENABLE_URTEST:BOOL=ON.
Fixed: autest build targets
autest, autest_no_install and autest-uds show up in --target help and resolve in a ninja -n dry run.
Fixed: connection tracking coverage claim
The sentence is gone from the description and the commit message.
Blocking: a cached ENABLE_AUTEST=OFF now overrides an explicit ENABLE_URTEST=ON
The FORCE at cmake/UraniumOptions.cmake:22-25 treats the old cached value as a choice. Every tree configured on 10.2.x has ENABLE_AUTEST:BOOL=OFF and ENABLE_AUTEST_UDS:BOOL=OFF, because option() writes the default. So the first configure at your head turns off what the user just asked for. On hera:
- A tree configured at the base with
cmake --preset default, thencmake -B <dir> -DENABLE_URTEST=ONat your head, exits 0 withENABLE_URTEST:BOOL=OFFand a warning telling me to useENABLE_URTEST. The same command again givesON. - A tree configured at the base with
cmake --preset autest, thencmake --preset autest-udsat your head, ends withENABLE_URTEST_UDS:BOOL=OFFandconfigured_curl_uds=""inurtest.sh. That command worked at the base. A second run givesON.
cmake --preset branch-autest on a build directory left by branch-release should hit the same path. The AUTEST_SANDBOX and AUTEST_OPTIONS migration has the same shape: on an old autest tree, a -DURTEST_OPTIONS=... or -DURTEST_SANDBOX=... passed on the first configure is replaced by the old cached default. The previous revision got the option case right. The ("OFF", "ON", "OFF") and ("ON", "OFF", "ON") rows at test_build_compatibility.py:30 now assert the new behavior, and cmake -P can't tell an old default from a value passed on this run.
What would change my mind: force the old value only when the Uranium value is undefined or the old value is ON, for example if(NOT DEFINED ENABLE_URTEST${suffix} OR deprecated_value), and still unset the old entry either way. That keeps your -DENABLE_AUTEST=ON fix. A test that configures from a base-style cache (ENABLE_AUTEST:BOOL=OFF, no ENABLE_URTEST) plus -DENABLE_URTEST=ON would catch a regression.
Non-blocking: the docs paragraph splits a sentence from its example
uranium-tests.en.rst:69-78 sits between "runs the complete pytest-owned inventory:" and the cmake --build build --target urtest block that colon introduces. Moving the two paragraphs below that block fixes it. The "takes precedence" sentence will need to match whatever you do above.
Nit: test fixtures
-v;-n;8intest_build_compatibility.py:61and in the seeded test isn't a value that works.urtest.sh.in:35pastesURTEST_OPTIONSinto the shell unquoted, so the rendered line is-- -v;-n;8 "$@"and bash passes only-v. OldAUTEST_OPTIONSvalues were space-separated, so-v -n 8is the realistic case.f"{target}:" in targets.stdoutonly matches Ninja'sautest: phony. The Makefile generator, which thebranchpresets use, prints... autest.
Nit: the PR description shows literal \n
The last edit saved the description with literal backslash-n sequences, so it renders as one paragraph with \n in it.
Verified: CI
All 14 checks are green on 88b2f1a05c.
The supported 10.2.x branch still relies on AuTest while master uses pytest, making test maintenance and CI behavior diverge between releases. This patch backports the Uranium framework and converted tests from apache#13545, preserving branch-specific coverage and configuration formats. It includes the Bash 3 compatibility fix from apache#13884 and adapts the build, documentation, and test helpers for the release branch. Explicit replay comparisons and native checks preserve the original assertions. The migration also includes the outbound connection-accounting fix carried by apache#13545. Pending connections retain their tracker reservation until the resulting session takes ownership, preserving per-origin connection counts and limits when transactions share a connection attempt. HTTP/2 closes its network connection before session-close hooks run. This patch preserves the peer, effective client, and local endpoints so those hooks can still inspect valid addresses, including PROXY protocol addresses. Regression checks exercise ordinary and PROXY HTTP/2 sessions. Co-authored-by: GPT-6 Astra Medium
An exported sandbox path makes the collision-diagnostic self-test reuse the enclosing pytest session's locked sandbox, preventing the intended collection diagnostic from running. This patch gives the child session an explicit private sandbox and exercises both serial and parallel collection with an inherited, locked parent sandbox. The shared-sandbox safety lock remains unchanged. Co-authored-by: GPT-6 Astra Medium
88b2f1a to
67ff6f2
Compare
|
Thanks, Bryan. The cache migration now follows your proposed boolean precedence: an old OFF cannot override an explicit Uranium ON, while an old ON can still enable a previously configured Uranium OFF. Both deprecated entries are removed either way. Explicit Uranium sandbox/options values, including empty values, take precedence over their old counterparts. The regression now exercises real base-style caches, first-configure explicit enables, UDS selection, and repeated configuration. I verified all 23 compatibility cases with both Ninja and Unix Makefiles. The fixtures use space-separated options, and target discovery accepts both generators. The documentation paragraph is below its example, and the PR body has real newlines again. I also carried the shared migration-parity fixes into this branch: explicit replay comparisons, original native priority/null-transform checks, TLS assertions, and preservation of HTTP/2 session addresses through close hooks (including effective PROXY addresses). The shared changes are also being prepared in a separate master PR. Validation includes the framework suite (135 passed, 3 opt-in configure cases skipped; those cases were separately verified with both generators), the build/formatter, Sphinx with warnings treated as errors, and focused runtime tests covering the changed scenarios. No additional CI rerun comment was posted. |
|
The corresponding master corrections are now in #13914, including the HTTP/2 close-hook endpoint fix and the shared Uranium assertion/lifecycle fixes. Its local focused run passed 75 tests with eight workers, alongside 110 framework tests and 38 relevant unit tests. This keeps the backport fixes from being absent on master. |
bryancall
left a comment
There was a problem hiding this comment.
✅ Approve
Thanks for another quick turnaround.
Verified: the upgrade path, on hera
Every case from my last review now does the right thing on the first configure from a tree built at the base: -DENABLE_URTEST=ON, --preset autest-uds, explicit URTEST_OPTIONS and URTEST_SANDBOX, and --preset autest itself. All 23 compatibility cases pass, including the real-tree ones. The HTTP/2 close-hook test fails on h2 and h2-proxy with the ats_ip_copy lines removed and passes with them.
Non-blocking
- The h2-proxy case never checks for
192.0.2.7, so a getter that returned the peer address at both start and close would still pass. The same applies to #13914. - Test 4 in
cache-control-basic.test.yamlpasses without the client'sno-cache, because/no_cache_controlis never cached anyway. test_null_transform.py:16callsnull_transform"buffering"; the buffered one isbnull_transform.
* Preserve HTTP/2 addresses through close hooks HTTP/2 session destruction closes its network connection before invoking session-close hooks. The session address APIs then return null or stale endpoints, preventing plugins from inspecting the completed connection. This patch caches both socket endpoints and the effective client address before closing the connection. The close-hook regression compares the numeric addresses and ports with their session-start values, including the effective address supplied through PROXY protocol. Co-authored-by: GPT-6 Astra Medium * Restore Uranium coverage found in backport review Review of the Uranium backports (#13889 and #13892) found gaps on master: some replay values did not enable verification, and some converted tests no longer exercised the original body, framing, or lifecycle assertions. Leaving those corrections only on release branches would make master less thoroughly tested than the supported releases. This patch restores explicit replay assertions and original protocol semantics, including independent Lua client sessions, length synthesis, complete large-response checksums, and TLS hook counts. A focused guard protects the audited manifests and their external replay dependencies. The accompanying HTTP/2 production fix preserves addresses during session-close hooks. The strengthened continuation regression exposed that shared issue, so this PR includes the fix as well as the tests. Co-authored-by: GPT-6 Astra Medium ---------
The supported 10.2.x branch still relies on AuTest while master uses
pytest, making test maintenance and CI behavior diverge between releases.
This patch backports the Uranium framework and converted tests from
#13545, preserving the branch-specific coverage and configuration
formats. It includes the Bash 3 compatibility fix from #13884 and adapts
the build, documentation, and test helpers for the release branch.
The migration also includes the outbound connection-accounting fix
carried by #13545. Pending connections retain their tracker reservation
until the resulting session takes ownership, preserving per-origin
connection counts and limits when transactions share a connection attempt.
HTTP/2 closes its network connection before session-close hooks run. This patch preserves the peer, effective client, and local endpoints so those hooks can still inspect valid addresses, including PROXY protocol addresses. Regression checks exercise ordinary and PROXY HTTP/2 sessions. Explicit replay comparisons and restored native checks preserve the original assertions.
Co-authored-by: GPT-6 Astra Medium