Repository navigation
Backport Uranium review follow-ups to 9.2.x - #13938
Conversation
bryancall
left a comment
There was a problem hiding this comment.
❌ Request changes
I reviewed e617117c70..fed0ff40ef, your backport of 8c46b83 (#13928) to 9.2.x: 62 files, +276/-498. I compared it with the master commit file by file and built fed0ff40ef in ci.trafficserver.apache.org/ats/fedora:44 with the configure flags from ci/jenkins/bin/autest.sh (traffic_server sha256 320425e35cac156c...). Then I ran the whole Uranium suite as root. The restored checks work: they catch two real 9.2.x conversion bugs. Three tests fail at this head, though, and CI shows the same three.
Please fix before merge: test_proxy_protocol reads a gold file this PR deletes
Still present at fed0ff40. test_proxy_protocol.py:56 still calls assert_matches_gold(result.stderr, directory / "gold" / f"test_case_{index}_stderr.gold"), but the PR deletes proxy_protocol/gold/test_case_0_stderr.gold and test_case_1_stderr.gold and their uranium_dist.inc lines. Master doesn't have these files only because it had already rewritten test_proxy_protocol.py as a replay test. That rewrite never came to 9.2.x. The test fails with AssertionError: Gold file does not exist: .../proxy_protocol/gold/test_case_0_stderr.gold, both locally and on CI AuTest 1of4. With the base tests (e617117c70) on the same build, it passes. Please keep both files and their uranium_dist.inc entries.
What would change my mind: a 9.2.x test_proxy_protocol.py that no longer reads the stderr gold, or a green AuTest 1of4 at a new head.
Please fix before merge: the restored checks fail two more 9.2.x tests
Still present at fed0ff40. CI AuTest 3of4 and 2of4 fail on these, and so does my run.
test_background_fill.py:61setsproxy.config.ssl.client.alpn_protocols. 9.2.x does not define that record (it is missing frommgmt/RecordsConfig.cc), and the 9.2.xbackground_fill.test.pynever set it. The teardown fails withUnrecognized configuration value 'proxy.config.ssl.client.alpn_protocols'. Please drop it, as you did forconnect.down.policyintls_verify_override_scenario.py.test_cert_update.py:182-185adds a malformed-replacement step that the 9.2.xcert_update.test.pydid not have. That step logsERROR: SSLCreateClientContext(): failed to load client certificate: .../client1.pem(iocore/net/SSLClientUtils.cc:316), plus twoERROR: SSL::...PEMlines. Anats.allow_errors()scoped to those lines would keep the step and every other check. Please don't usedisable_log_checks, since the original never relaxed this test.
What would change my mind: green AuTest 2of4 and 3of4 runs with these two tests passing.
Please fix before merge: two relaxations the 9.2.x originals did not have
Still present at fed0ff40. The PR says disable_log_checks appears only where the 9.2.x originals relaxed the checks. Two sites contradict that. Neither 9.2.x log_pipe.test.py nor log-filenames.test.py touches diags_log.Content. When diags go to stdout, trafficserver.test.ext:234 applies the ERROR: exclude to stdout as well.
test_log_pipe.py:37turns the checks off for the resized pipe. The manual check at:153covers onlyERROR:(minus the EPERM resize failure) and runs before shutdown, soUnrecognized configuration valueand shutdown errors go unchecked.ats.allow_errors(r"Set pipe size failed for pipe .*: Operation not permitted")would keep the EPERM tolerance (LogFile.cc:212) and restore the rest.test_log_filenames.py:37turns the checks off for the stdout and stderr cases, with nothing in their place.
With either relaxation removed, the test still passes. Master has the same two lines, so a follow-up there would help too.
What would change my mind: a relaxation in the 9.2.x originals that I missed, or a run where either test fails with the default checks on.
Verified: the backport matches master apart from the declared deviations
- 35 files carry master's
+/-lines unchanged. Of the 18 that differ, 13 are gold or replay deletions whose content differs between branches. The other five differ for 9.2.x reasons:TSHttpHookAdd.en.rst(the 9.2.x base text says "Gold test"),README.md(master's second hunk has no 9.2.x paragraph to edit),ats.py(import reis already at:24),remap_https.test.yaml(declared), andtest_tls_resumption_scope.py, where the droppedreload_task_statusesasserts need the reload framework. - 55 of the master files you didn't carry don't exist on 9.2.x. Two do.
test_regex_remap.pyis declared.test_http2.py's only hunk targets the settings-rate-limit case, which 9.2.x lacks. - Declared deviations: 9.2.x has no
ConfigContext.hand notests/uranium_tests/jsonrpc. 9.2.xregex_remap.test.py:127expects PCRE1-21and assignsdiags_log.Contentwith=, which replaces all the default diags checks. Thetext/htmlContent-Type comes fromHttpBodyFactory.cc:79andHttpTransact.cc:8537.proxy.config.http.connect.down.policyis not in 9.2.xRecordsConfig.ccor in any 9.2.x original. - Every
disable_log_checksthe PR adds matches a 9.2.x original that replaced the default checks for that instance: the verify_plugin, h2spec, max_active_streams (enforce only), oversized_field_h2, esi_request_size_cap, slice, traffic_dump ts3, url_sig, webp and ssl_multicert_loader originals.
Verified: the restored checks fail when they should
Each mutation was reverted afterwards, and the restored test passed again.
- Re-adding
connect.down.policytotls_verify_override_scenario.py(file sha2567aa8d6f3211e411e):test_tls_verify_override_basefails at teardown onUnrecognized configuration value 'proxy.config.http.connect.down.policy'. - Changing
remap_https.test.yaml:54to master'stext/html; charset=utf-8(7751f9d6374c42bd): Proxy Verifier reportsEquals Violation ... Correct Value: "text/html; charset=utf-8", Actual Value: "text/html". - Removing
disable_log_checks=Truefromtest_traffic_dump_ip_filter.py:92(1d4b33348fc2f75c): the test fails onERROR: [traffic_dump] Problems parsing IP filter address argument.
Verified: deleted files and uranium_dist.inc
The PR deletes 26 files and removes exactly those 26 uranium_dist.inc lines. Nothing in the inc points at a missing file. The six tracked files it leaves out are the same six as at the base, covered by tests/Makefile.am:51. test_proxy_protocol above is the only remaining reader of a deleted file.
Verified by running it
Full suite, -n 8, as root: 651 passed, 8 skipped, 2 failed, 2 teardown errors. The failures are the three above plus test_thread_config, which fails the same way with the base tests in this container. A focused run over the touched and affected tests: 128 passed, 1 failed, 2 errors, 1 skipped (test_runroot_verify skips as root).
Non-blocking
test_regex_remap.py:85could narrow its relaxation as master did.ats.allow_errors(r"ERROR: .regex_remap. Bad regular expression result -21 ")passes. With no relaxation at all, the test fails on that-21line.test_esi.py:105checksbehavior == "too-small", but 9.2.x has no such variant, so the condition is always false.- Nothing on 9.2.x imports
remap/basic_conf_remap.pyorremap/remap_reload.py, so the edits there never run. - AuTest 0of4 (
chunked_h2_flow_control) and 2of4 (test_regex_revalidate) also hit metric timeouts in tests this PR doesn't touch.chunked_h2_flow_controlfailed in one of my two runs.test_regex_revalidatepassed in both. Both look flaky.
Not verified
- A non-root run. CI runs as
jenkins, sotest_runroot_verifyand the EPERM path intest_log_pipebehave differently there. - Sanitizer builds. I ran none, which matches the #13928 review.
- CI at
fed0ff40: AuTest 0of4 through 3of4 fail as described. Clang-Analyzer, CentOS, Debian, Docs, Fedora, Format, OSX, RAT, Rocky and Ubuntu pass.
The AuTest to Uranium migration left gaps that let regressions pass silently, and the 9.2.x backport of the Uranium tests inherited them. Procedural tests ignored ERROR and unrecognized-configuration lines in diags.log, several converted tests dropped assertions, and the test docs still described AuTest. This patch backports 8c46b83 (apache#13928) to 9.2.x. It restores the default diags checks, with disable_log_checks only where the 9.2.x originals relaxed them, restores the dropped assertions and removes unused gold and replay files, including from uranium_dist.inc. Relative to master, 9.2.x has no config reload framework, so the reload test and doc changes are dropped. regex_remap keeps its 9.2.x relaxation, since its PCRE1 errors differ, remap_https expects the text/html Content-Type that 9.2.x sends, and tls_verify_override and background_fill no longer set records 9.2.x does not define. cert_update allows the errors from its deliberate malformed PEM, and the proxy_protocol stderr gold files stay, since 9.2.x still uses them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fed0ff4 to
f282acd
Compare
bryancall
left a comment
There was a problem hiding this comment.
✅ Approve
I re-reviewed f282acde against fed0ff40. Both sit on the same base, e617117c70, so the range-diff is the whole change: five files, +30/-1. I also re-read the full PR against that base (62 files, +278/-471). Both blocking test failures are fixed. My third point was wrong to block on, and I explain why below. CI is green on every job.
Fixed: test_proxy_protocol has its stderr gold files back
proxy_protocol/gold/test_case_0_stderr.gold and test_case_1_stderr.gold are back, byte for byte the same as at the base (blob d613cd8957), and listed again at uranium_dist.inc:923 and :925. test_proxy_protocol.py:56 reads them. The test passes in my run. When I change 200 OK to 500 in the gold, it fails with Output did not match gold file, so the gold really is compared.
Fixed: test_background_fill and test_cert_update
test_background_fill.pyno longer setsproxy.config.ssl.client.alpn_protocols. If I put it back, teardown fails onUnrecognized configuration value 'proxy.config.ssl.client.alpn_protocols'.test_cert_update.py:55-56now allows exactly the three ERROR lines the malformed step writes: twoSSL::...PEMlines andSSLCreateClientContext(): failed to load client certificate: .../client1.pem. Those three are the only ERROR lines in that test's diags.log. If I remove the call, the test fails on them. If I point the pattern atclient9.pem, it fails on theclient1.pemline. The PEM alternative is broader than one file, but every other cert or key failure also writes its own summary line, and those still fail the test. The cert checks at:175-182would catch a failed load in the valid steps too.
Withdrawn: the disable_log_checks in test_log_pipe.py and test_log_filenames.py
I was wrong to block this PR on them. Both lines (test_log_pipe.py:37, test_log_filenames.py:37) came in with #13892, and this PR doesn't touch either file. Master has the same two lines, and #13928 didn't change them there either. Sorry for the noise.
They are still worth fixing in a follow-up on both branches. With either relaxation removed, the test still passes. I checked that as root last round and as a regular user this round.
Verified by running it
I built f282acde in ci.trafficserver.apache.org/ats/fedora:44 with the configure flags from ci/jenkins/bin/autest.sh and ran Uranium as a regular user this time, the way CI does.
- The touched and affected tests (proxy_protocol, background_fill, cert_update, log_pipe, log_filenames, tls_verify_override, traffic_dump),
-n 8: 17 passed, 1 skipped (test_traffic_dump_http3is manual only). - Full suite,
-n 8: 653 passed, 7 skipped, 1 failed. The failure wastest_runroot_verify, and it came from my setup: my container user had no passwd entry, sogetpwuid()failed. With an entry added, all six runroot tests pass.test_thread_config, which failed as root last round, passes this time.
Verified: CI at f282acde
All 14 checks pass, including URTest 0of3, 1of3 and 2of3. Those are the old AuTest jobs under a new name, after the trafficserver-ci rename on 10/29. The same jobs failed on these tests at fed0ff40.
Non-blocking
tests/README.md:58says to merge Dependabot pull requests that bumpuv.lock. 9.2.x has no Dependabot config, so on this branch a bump is a manual change.tls/replay/dual_cert_default_ec_rsa.replay.yaml:24-25swaps the default entry, but nothing on 9.2.x reads that file. Its test only exists on master. That puts it withremap/basic_conf_remap.pyandremap/remap_reload.pyfrom last round.test_http2_max_active_streams.py:43turns off all checks for the enforce instance. That matches the 9.2.x original, but anats.allow_errors()for thecode=0x07 ... active streams cap reachedline would keep a real stream error on streams 1 or 3 visible.test_traffic_dump_http3.py:71setsproxy.config.quic.qlog.file_base, which 9.2.x doesn't define (it hasproxy.config.quic.qlog_dir). This PR doesn't touch the file, and the test is manual only, but with the checks back on it would fail on a QUIC build.- The last round's notes on
test_regex_remap.py:83andtest_esi.py:105still apply.
Not verified
- I couldn't read the Jenkins consoles (they need a login), so I don't know which tests each URTest shard ran. I only know the jobs passed.
- A QUIC build or a sanitizer build.
Claude Code agents wrote this review, and I read it before posting.
The AuTest to Uranium migration left gaps that let regressions pass
silently, and the 9.2.x backport of the Uranium tests inherited them.
Procedural tests ignored ERROR and unrecognized-configuration lines in
diags.log, several converted tests dropped assertions, and the test
docs still described AuTest.
This patch backports 8c46b83 (#13928) to 9.2.x. It restores the
default diags checks, with disable_log_checks only where the 9.2.x
originals relaxed them, restores the dropped assertions and removes
unused gold and replay files, including from uranium_dist.inc.
Relative to master, 9.2.x has no config reload framework, so the
reload test and doc changes are dropped. regex_remap keeps its 9.2.x
relaxation, since its PCRE1 errors differ, remap_https expects the
text/html Content-Type that 9.2.x sends, and tls_verify_override and
background_fill no longer set records 9.2.x does not define.
cert_update allows the errors from its deliberate malformed PEM, and
the proxy_protocol stderr gold files stay, since 9.2.x still uses them.
🤖 Generated with Claude Code