The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/acl-version-filter-wiring has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
786394f97cdd843b5f53fc4a8d75ecf37087fcd9 / unbridled-41 
<[email protected]>
fix(acl): apply the rule version filter the console sends

The ACL rules table offers a 版本 filter (全部 / ACL 1.0 / ACL 2.0) and sends it:

    aclVersion: ruleVersionFilter === 'all' ? undefined : ruleVersionFilter
    (web/src/pages/instance/acl.tsx:203 -> web/src/api/acl.ts:67)

but the value never reached the query. AclController.listRules declared no
aclVersion @RequestParam (Spring discards an unmatched query parameter), the
service's signature had no such parameter, and it passed a literal null into the
predicate that already existed:

    aclRepository.findRulePage(principal, resource, scope, decision, null, 
page, pageSize)
    // MybatisPlusAclRepository.ruleQuery: .eq(hasText(aclVersion), 
"acl_version", aclVersion)

Selecting a version therefore returned both versions with an unchanged total -
and on a Tencent instance, where every role-backed rule is version 1.0, 
selecting
ACL 2.0 still listed the 1.0 rules. Demo mode hid it because the mock service
filters client-side.

Bind the parameter, add the service overload (the 7-argument method stays, so 
the
AI tool handlers keep compiling), forward the value to the repository, filter 
the
Tencent projection with it, and document the parameter in the API spec.

Tests (server/):
mvn -o -B -ntp test -Dtest='AclServiceTest,AclControllerTest' -> Tests run: 110,
Failures: 0, Errors: 0.
- new 
AclServiceTest#listRulesShouldForwardTheAclVersionFilterToTheRepositoryTest
  and #listRulesShouldFilterTencentRulesByAclVersionTest fail with the old 
wiring
  (the repository received null; the Tencent projection kept the 1.0 role) and
  pass with it.
- new AclControllerTest#listRulesShouldApplyTheAclVersionFilterTest fails with 
the
  parameter unbound ("Argument(s) are different") and passes with it.
- three existing controller cases were updated to the new service signature.
- mvn -o -B -ntp checkstyle:check passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37965686712

With regards,
GitHub Actions via GitBox

Reply via email to