ci: run proxy-cache and dubbo-proxy plugin subdirectory tests#13613
Conversation
The `t/plugin/[a-k]*.t` / `t/plugin/[l-z]*.t` matrix globs only match
top-level `.t` files, so plugin tests that live in subdirectories were never
executed by CI. This silently dropped coverage for:
t/plugin/proxy-cache/{disk,memory}.t
t/plugin/dubbo-proxy/{route,upstream}.t
The dubbo backend is already started in build.yml, so the dubbo-proxy tests
were prepared to run but the glob never reached them. Add the two directories
to the matrix so `prove -r` recurses them.
The ext-plugin subdirectory tests are intentionally left out for now: several
of them require a real external plugin runner that CI does not currently set
up, so enabling them needs separate work.
There was a problem hiding this comment.
Pull request overview
This PR fixes CI test sharding for plugin tests by ensuring Perl .t tests located under plugin subdirectories are included in the GitHub Actions prove invocation, so they actually run in CI.
Changes:
- Extend the plugin test matrix entries to include
t/plugin/dubbo-proxyandt/plugin/proxy-cachesoprove -rwill recurse into those directories. - Keep the existing top-level plugin
.tglob sharding intact while augmenting it with the missing subdirectory-based suites.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Enabling dubbo-proxy surfaced a stale test: dubbo-proxy/route.t TEST 1 fails because current apisix logs `config_yaml.lua:339: unknown plugin [dubbo-proxy]` when dubbo is disabled globally, and the test's implicit no_error_log check rejects it. The route still works (returns "hello world"); only the test's error_log expectation is out of date from never being run. That's a separate test fix, so scope this PR to the proxy-cache directory, which passes as-is.
dubbo-proxy plugin tests live in a subdirectory that the matrix globs never matched, so they never ran (even though build.yml already starts the Dubbo backend). Add t/plugin/dubbo-proxy to the matrix. route.t TEST 1 had rotted while unrun: it asserted that a route referencing a globally-disabled plugin is silently loaded and the plugin skipped, but apisix now rejects such a route (config_yaml reports "unknown plugin" and the route is not created, so the request gets 404). Update the test to assert the current behavior. ext-plugin is left out for now: those tests are timing-flaky when run in a batch and need separate isolation work.
|
P2: This PR fixes the plugin subdirectory coverage gap by explicitly adding - t/plugin/[a-k]*.t t/plugin/dubbo-proxy
- t/stream-plugin t/plugin/[l-z]*.t t/plugin/proxy-cacheThat means this PR would still leave a plugin subdirectory test gap undisclosed. Please either add |
Description
The plugin test shards use globs that only match top-level
.tfiles (t/plugin/[a-k]*.t,t/plugin/[l-z]*.t). A glob like that doesn't match a directory and*doesn't cross/, so plugin tests living in subdirectories were never handed toproveand never ran in CI.This enables two of those subdirectories:
build.ymlalready starts the Dubbo backend, so dubbo-proxy was prepared to run but the glob never reached it.Stale test fix:
dubbo-proxy/route.tTEST 1 had rotted while unrun. It asserted that a route referencing a globally-disabled plugin is silently loaded with the plugin skipped (returnshello world). Current apisix instead rejects such a route —config_yamlreportsunknown plugin [dubbo-proxy]and the route is not created, so the request gets404. The test is updated to assert the current behavior.Left out for now:
t/plugin/ext-plugin/— those tests are self-contained (Lua mock runner) but timing-flaky when run in a batch (the plugin races to connect to the mock runner's unix socket). They need separate test-isolation work before they can run reliably in CI.Checklist