Skip to content

10.2.x: Add Test.AddConfigReload() autest extension (#13075) - #13502

Merged
cmcfarlen merged 1 commit into
apache:10.2.xfrom
bneradt:backport-add-config-reload-10.2.x
Aug 5, 2026
Merged

10.2.x: Add Test.AddConfigReload() autest extension (#13075)#13502
cmcfarlen merged 1 commit into
apache:10.2.xfrom
bneradt:backport-add-config-reload-10.2.x

Conversation

@bneradt

@bneradt bneradt commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Config reload AuTests rely on fire-and-forget traffic_ctl calls plus
sleeps and log grepping. This makes the tests slow and fragile and
cannot verify specific handlers or report reload failures.

This adds Test.AddConfigReload() to monitor reload completion and
validate task status. It carries filenames through child reload tasks
and migrates the applicable tests to the deterministic helper.

Fixes: #12965

(cherry picked from commit 7085923)

Config reload AuTests rely on fire-and-forget traffic_ctl calls plus
sleeps and log grepping. This makes the tests slow and fragile and
cannot verify specific handlers or report reload failures.

This adds Test.AddConfigReload() to monitor reload completion and
validate task status. It carries filenames through child reload tasks
and migrates the applicable tests to the deterministic helper.

Fixes: apache#12965

(cherry picked from commit 7085923)
Copilot AI lite review requested due to automatic review settings August 5, 2026 19:15
@bneradt bneradt added this to the 10.2.0 milestone Aug 5, 2026
@bneradt bneradt self-assigned this Aug 5, 2026
@bneradt bneradt added AuTest Config Reload Backport Marked for backport for an LTS patch release 10.2.x labels Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the determinism and observability of AuTests that exercise configuration reloads by introducing a reusable Test.AddConfigReload() helper and migrating existing gold tests away from sleep/log-grep synchronization. It also enhances the config reload task trace so dependent/child reload tasks can carry filenames, enabling structured validation of which handlers ran.

Changes:

  • Add tests/gold_tests/autest-site/config_reload.test.ext implementing Test.AddConfigReload() using traffic_ctl config reload -m plus optional JSONRPC task-tree validation.
  • Propagate filenames through child/dependent reload tasks (ConfigContext / ConfigReloadTask) and wire SSL reload subtasks to known config filenames.
  • Migrate multiple AuTests from fire-and-forget reload + sleeps/log greps to the new helper; add developer documentation for the new extension.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/gold_tests/traffic_ctl/remap_inc/wait_reload.sh Removes legacy log-grep helper script for reload waiting.
tests/gold_tests/traffic_ctl/remap_inc/remap_inc.test.py Switches remap include reload test to Test.AddConfigReload().
tests/gold_tests/tls/tls_verify4.test.py Replaces reload+sleep with Test.AddConfigReload() in TLS verify test.
tests/gold_tests/tls/tls_tunnel.test.py Uses Test.AddConfigReload() and removes log-based readiness gating.
tests/gold_tests/tls/tls_sni_yaml_reload.test.py Uses Test.AddConfigReload() for expected-fail reloads; adjusts ATS process settings.
tests/gold_tests/tls/tls_client_cert.test.py Migrates SNI reload synchronization to Test.AddConfigReload().
tests/gold_tests/tls/tls_client_cert_plugin.test.py Migrates plugin TLS client-cert reload synchronization to Test.AddConfigReload().
tests/gold_tests/tls/tls_client_cert_override_plugin.test.py Migrates override plugin reload synchronization to Test.AddConfigReload().
tests/gold_tests/tls/tls_check_cert_selection_reload.test.py Replaces log-based multicert reload wait with Test.AddConfigReload().
tests/gold_tests/tls/ssl_multicert_loader.test.py Uses Test.AddConfigReload() for expected-fail multicert reload; adjusts ATS process settings.
tests/gold_tests/tls/ssl_key_dialog.test.py Simplifies “await reload” logic via Test.AddConfigReload().
tests/gold_tests/remap/remap_reload.test.py Migrates remap reload success/failure tests to Test.AddConfigReload() with task expectations.
tests/gold_tests/remap/remap_acl.test.py Replaces manual reload + condwait with Test.AddConfigReload() in remap ACL test flow.
tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate_miss.test.py Splits touch vs reload steps and uses Test.AddConfigReload() for reload.
tests/gold_tests/parent_config/parent_config_reload.test.py Replaces sleep/log-ready gating with Test.AddConfigReload().
tests/gold_tests/logging/log_retention.test.py Uses Test.AddConfigReload() instead of direct traffic_ctl invocation.
tests/gold_tests/ip_allow/ip_category.test.py Migrates ip_allow reload synchronization to Test.AddConfigReload().
tests/gold_tests/ip_allow/ip_allow_reload_triggered.test.py Migrates multiple reload cases (including absent-task validation) to Test.AddConfigReload().
tests/gold_tests/dns/splitdns_reload.test.py Migrates splitdns reload synchronization to Test.AddConfigReload().
tests/gold_tests/cache/cache_config_reload.test.py Uses Test.AddConfigReload() and preserves token-based reload identification.
tests/gold_tests/autest-site/config_reload.test.ext New AuTest extension providing Test.AddConfigReload() and task-tree validation utilities.
src/mgmt/config/ConfigReloadTrace.cc Extends child task creation to accept and propagate filenames via ConfigContext.
src/mgmt/config/ConfigContext.cc Updates dependent context creation to pass filename through to child tasks.
src/iocore/net/SSLClientCoordinator.cc Adds filename metadata to SSL-related dependent reload tasks for traceability.
include/mgmt/config/ConfigReloadTrace.h Updates ConfigReloadTask::add_child() signature to accept filename metadata.
include/mgmt/config/ConfigContext.h Updates ConfigContext::add_dependent_ctx() signature to accept filename metadata.
doc/developer-guide/testing/index.en.rst Adds config reload extension documentation to the testing guide index.
doc/developer-guide/testing/config-reload-ext.en.rst New documentation page describing Test.AddConfigReload() usage and semantics.
doc/developer-guide/config-reload-framework.en.rst Updates reload framework docs to recommend the new autest extension for end-to-end tests.

Comment thread tests/gold_tests/autest-site/config_reload.test.ext
@bneradt bneradt changed the title Add Test.AddConfigReload() autest extension (#13075) 10.2.x: Add Test.AddConfigReload() autest extension (#13075) Aug 5, 2026
@cmcfarlen
cmcfarlen merged commit 8d9fa1a into apache:10.2.x Aug 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.2.x AuTest Backport Marked for backport for an LTS patch release Config Reload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants