laserninja opened a new pull request, #12870:
URL: https://github.com/apache/gravitino/pull/12870

   > Stacked on #12869. That commit is included in this diff until #12869 
merges.
   
   ### What changes were proposed in this pull request?
   
   Add tag association support for `SEMANTIC_MODEL` metadata objects:
   
   - Register `SEMANTIC_MODEL` in `TagManager`'s supported metadata object 
types.
   - Validate Semantic Model existence in 
`MetadataObjectUtil.checkMetadataObject` via 
`semanticModelDispatcher().semanticModelExists()`.
   - Wire `SEMANTIC_MODEL` into `OrphanedMetadataObjectRelationService` so 
orphaned owner/tag/policy/statistic/securable-object rows are soft-deleted by 
the relational garbage collector.
   - Update `docs/tags.md`, `docs/open-api/openapi.yaml`, and 
`docs/open-api/tags.yaml`.
   - Add tests for supported-type registration, existence validation, tag 
inheritance from the parent schema and catalog, the REST list/get/associate 
paths, and orphan relation cleanup.
   
   Two follow-up hooks carry `TODO(#12600)` because they need the Semantic 
Model PO/mapper/meta-service that #12600 introduces: id resolution in 
`RelationalEntityStoreIdResolver` and full-name resolution in 
`MetadataObjectService`. Neither is reachable today - no Semantic Model can be 
created yet, so no relation row can exist.
   
   ### Why are the changes needed?
   
   Semantic Models are first-class metadata objects (#12209) and governance for 
them is expected to reuse the existing tag machinery. Policies reach Semantic 
Models through policy-on-tag, so tag support is the prerequisite. Direct policy 
associations and the Web UI stay out of scope.
   
   Fix: #12615
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Tags can be associated, listed, fetched, and removed for 
`SEMANTIC_MODEL` objects through the existing metadata-object tag REST APIs, 
and a Semantic Model inherits tags from its schema and catalog.
   
   ### How was this patch tested?
   
   ```bash
   ./gradlew spotlessApply && ./gradlew spotlessCheck
   ./gradlew :core:test :server:test :server-common:test -PskipITs
   ./gradlew :docs:build
   ```
   
   - `:core:test` 1811 tests, `:server:test` 324, `:server-common:test` 288 - 
all green.
   - OpenAPI spec validated by `:docs:build`.
   - New tests: `TestTagManager#testSemanticModelIsSupportedForTags`, 
`TestMetadataObjectTagOperations#testTagsForSemanticModel`, 
`TestOrphanedMetadataObjectRelationService#testSoftDeleteOrphanedSemanticModelRelations`,
 plus a Semantic Model ancestor case in `TestMetadataObjectUtil`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to