Skip to content

[Cherry-pick to branch-1.3] [#11212] test(authz): add CI workflow for multi-instance consistency (#11213)#11396

Open
github-actions[bot] wants to merge 1 commit into
branch-1.3from
cherry-pick-aef7acaf-to-branch-1.3
Open

[Cherry-pick to branch-1.3] [#11212] test(authz): add CI workflow for multi-instance consistency (#11213)#11396
github-actions[bot] wants to merge 1 commit into
branch-1.3from
cherry-pick-aef7acaf-to-branch-1.3

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot commented Jun 3, 2026

Cherry-pick Information:

  • Original commit: aef7aca
  • Target branch: branch-1.3
  • Status: ✅ Clean cherry-pick (no conflicts)

…11213)

### What changes were proposed in this pull request?

Adds a new GitHub Actions workflow at
\`.github/workflows/multi-instance-consistency-test.yml\`
that brings up two Gravitino instances backed by a shared MySQL service
container and runs
the shell-based consistency suite against them.

The complex instance-staging logic (JDBC download, conf patching,
PID-grep fix, server
start + health-wait) lives in \`dev/ci/setup_multi_instance.sh\`,
following the same pattern
as \`util_free_space.sh\` and \`test_multi_instance_consistency.sh\`.
The YAML step is a single
\`bash dev/ci/setup_multi_instance.sh\` call.

The consistency suite at \`dev/ci/test_multi_instance_consistency.sh\`
is a 19-phase /
128-assertion script that exercises the \`JcasbinAuthorizer\` caches
(\`ownerRelCache\`,
\`metadataIdCache\`, \`userRoleCache\`, \`loadedRoles\`,
\`groupRoleCache\`) and the
\`JcasbinChangePoller\` invalidation paths across two instances:

| Phase | What it covers |
|---|---|
| A / B' | Owner read-back + warm-cache invalidation (eventual,
poll-driven) |
| C / D | Role grant / revoke immediately effective on the peer |
| E | Role-privilege add/remove immediately effective on the peer |
| F | Role hard-delete clears peer's \`loadedRoles\` cache |
| G / H | User delete + same-name re-create has no stale role
inheritance |
| I | Role re-create with same name has no stale privilege leak |
| J | Cross-metalake isolation (role/owner does not leak) |
| K | DENY condition overrides ALLOW on a different role |
| L | Group lifecycle: create / grant / revoke / delete visible on peer
|
| N | \`setOwner\` propagation works for non-METALAKE entities (TAG) |
| O | Multi-role partial revoke only affects the revoked role |
| P | Owner change on TAG with warm cache on the peer |
| Q | Burst of \`setOwner\` calls within one poll window converges |
| R | Re-granting an already-held role is idempotent |
| S | GROUP-type owner propagated correctly via \`ownerRelCache\` |
| T | Tag delete + same-name re-create has no stale owner (owner_meta
invalidation) |
| U | GET \`/users/{user}\` on peer reflects role grant/revoke from the
other instance |
| V | GET \`/roles/{role}\` on peer reflects privilege changes from the
other instance |
| W | Bidirectional: grant/revoke on B is immediately effective on A |

Both Gravitino instances run with:

\`\`\`
gravitino.cache.enabled = false # isolates from entity-store cache
gravitino.authorization.enable         = true
gravitino.authorization.serviceAdmins  = admin
gravitino.entity.store.relational.jdbcUrl = <shared MySQL>
\`\`\`

A \`paths-filter\` job keeps the workflow from running for unrelated
changes.

### Why are the changes needed?

The script exercises the \`JcasbinAuthorizer\` cache layer end-to-end
across instances;
without a CI gate, regressions in these paths only surface when someone
runs the script
by hand. The recent \`versionCheckAndLoadRoles\` fix for the role-delete
propagation gap
(follow-up to #10996) in particular has no automated coverage.

Fix: #11212

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

The script itself is the test. It passes 128/128 in CI against two
instances:

\`\`\`
== Summary ==
Passed: 128
Failed: 0
\`\`\`

The workflow file is structured per the existing access-control /
integration test
workflows in this repo.
@github-actions github-actions Bot requested a review from jerryshao June 3, 2026 06:34
@yuqi1129 yuqi1129 closed this Jun 3, 2026
@yuqi1129 yuqi1129 reopened this Jun 3, 2026
@github-actions
Copy link
Copy Markdown
Author

github-actions Bot commented Jun 3, 2026

Code Coverage Report

Overall Project 66.8% -0.04% 🟢
Files changed 0.0% 🔴

Module Coverage
aliyun 1.72% 🔴
api 46.82% 🟢
authorization-common 85.96% 🟢
aws 3.66% -0.58% 🔴
azure 2.47% 🔴
catalog-common 10.04% 🔴
catalog-fileset 80.33% 🟢
catalog-glue 66.08% 🟢
catalog-hive 79.55% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 45.31% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.29% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 44.89% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.74% 🟢
catalog-lakehouse-paimon 79.29% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.91% 🟢
common 49.99% 🟢
core 82.49% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 41.2% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.26% 🟢
iceberg-common 56.75% 🟢
iceberg-rest-server 72.42% 🟢
idp-basic 85.99% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.83% 🔴
lance-rest-server 60.27% 🟢
lineage 53.02% 🟢
optimizer 82.87% 🟢
optimizer-api 21.95% 🔴
server 85.73% 🟢
server-common 73.13% 🟢
spark 32.79% 🔴
spark-common 39.75% 🔴
trino-connector 39.44% 🔴
Files
Module File Coverage
aws S3FileSystemProvider.java 0.0% 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant