Skip to content

[#12179] feat(core): Support policy-tag association - #12180

Draft
roryqi wants to merge 1 commit into
apache:mainfrom
qqqttt123:policy-tag-association-impl
Draft

[#12179] feat(core): Support policy-tag association#12180
roryqi wants to merge 1 commit into
apache:mainfrom
qqqttt123:policy-tag-association-impl

Conversation

@roryqi

@roryqi roryqi commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Add persistent policy-tag relation metadata for JDBC backends, including fresh and upgrade schemas.
  • Add core service, relation cache/backend routing, manager/dispatcher APIs, and cleanup on policy/tag/metalake deletion.
  • Add REST APIs to list tags for a policy and list/associate policies for a tag, with targeted tests.

Why are the changes needed?

PR #12177 defines the Policy -> Tag -> Metadata Object model. This implements the direct Policy <-> Tag association layer needed by that model.

Fix: #12179

Does this PR introduce any user-facing change?

Yes. It adds REST API support for:

  • GET /metalakes/{metalake}/policies/{policy}/tags
  • GET /metalakes/{metalake}/tags/{tag}/policies
  • POST /metalakes/{metalake}/tags/{tag}/policies

How was this patch tested?

  • ./gradlew :core:spotlessApply :server:spotlessApply
  • ./gradlew :core:test --tests org.apache.gravitino.storage.relational.service.TestPolicyMetaService -PskipITs
  • ./gradlew :server:test --tests org.apache.gravitino.server.web.rest.TestTagOperations --tests org.apache.gravitino.server.web.rest.TestPolicyOperations -PskipITs
  • git diff --check apache/main...HEAD

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support associating policies with tags

1 participant