Skip to content

ci: run proxy-cache and dubbo-proxy plugin subdirectory tests#13613

Merged
nic-6443 merged 4 commits into
apache:masterfrom
nic-6443:ci/run-plugin-subdir-tests
Jun 29, 2026
Merged

ci: run proxy-cache and dubbo-proxy plugin subdirectory tests#13613
nic-6443 merged 4 commits into
apache:masterfrom
nic-6443:ci/run-plugin-subdir-tests

Conversation

@nic-6443

@nic-6443 nic-6443 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

The plugin test shards use globs that only match top-level .t files (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 to prove and never ran in CI.

This enables two of those subdirectories:

t/plugin/proxy-cache/{disk,memory}.t
t/plugin/dubbo-proxy/{route,upstream}.t

build.yml already starts the Dubbo backend, so dubbo-proxy was prepared to run but the glob never reached it.

Stale test fix: dubbo-proxy/route.t TEST 1 had rotted while unrun. It asserted that a route referencing a globally-disabled plugin is silently loaded with the plugin skipped (returns hello world). Current apisix instead rejects such a route — config_yaml reports unknown plugin [dubbo-proxy] and the route is not created, so the request gets 404. 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

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have verified that this change is backward compatible

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.
Copilot AI review requested due to automatic review settings June 26, 2026 07:02
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. CI labels Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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 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-proxy and t/plugin/proxy-cache so prove -r will recurse into those directories.
  • Keep the existing top-level plugin .t glob 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.
@nic-6443 nic-6443 changed the title ci: run proxy-cache and dubbo-proxy plugin subdirectory tests ci: run proxy-cache plugin subdirectory tests Jun 26, 2026
nic-6443 added 2 commits June 29, 2026 09:23
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.
@nic-6443 nic-6443 changed the title ci: run proxy-cache plugin subdirectory tests ci: run proxy-cache and dubbo-proxy plugin subdirectory tests Jun 29, 2026
@membphis

Copy link
Copy Markdown
Member

P2: graphql-proxy-cache subdirectory tests are still not included in CI.

This PR fixes the plugin subdirectory coverage gap by explicitly adding t/plugin/dubbo-proxy and t/plugin/proxy-cache, and it explains why t/plugin/ext-plugin/ is intentionally left out. However, t/plugin/graphql-proxy-cache/ also contains runnable .t tests (disk.t, graphql.t, and memory.t) and is still not matched by the current matrix:

- t/plugin/[a-k]*.t t/plugin/dubbo-proxy
- t/stream-plugin t/plugin/[l-z]*.t t/plugin/proxy-cache

That means this PR would still leave a plugin subdirectory test gap undisclosed. Please either add t/plugin/graphql-proxy-cache to the appropriate shard, or document why it is intentionally excluded and should be handled separately.

@nic-6443 nic-6443 merged commit cdcaea1 into apache:master Jun 29, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants