jerryshao opened a new pull request, #15025: URL: https://github.com/apache/gravitino/pull/15025
### What changes were proposed in this pull request? Make a domain's backing tag a tag name only, applied with no value, in every public interface: - Java API: `Domain.backingTag()` returns `Optional<String>`; `updateBackingTag`, `createSubdomain` and `DomainOperations.createDomain` take the tag name as a `String`. - DTOs and requests: `DomainBackingTagDTO`, `DomainCreateRequest.BackingTag` and `DomainBackingTagSetRequest` drop `value`. A request that still sends `value` is rejected with 400. - Server REST, OpenAPI spec, Java and Python clients, MCP domain tool descriptions, listener `DomainInfo` and `UpdateDomainBackingTag*Event` now use the tag name. - `DomainManager.checkBinding` validates allowed values only when a binding has a value, so any existing tag, including one with an allowed-values list, can back a domain. The existing conflict rule already makes a tag back at most one domain when bindings have no value. - Docs (`domains.md`, `manage-domains-in-gravitino.md`, design doc) describe the new model: membership depends only on the presence of the tag, and any value on an assignment is ignored. Storage and the internal core layer are unchanged: the `backing_tag_value` column, `DomainEntity`, the core dispatchers and `DomainMembershipResolver` keep their value support for a possible future extension, and the public interfaces always bind without a value. Domains created by 2.0.0 development builds with a backing tag value keep filtering membership by that value; their backing tags need to be removed and rebound by name. Released versions have no such data. ### Why are the changes needed? Binding an existing tag that has an allowed-values list without a value was rejected with 400, and value binding let one tag back several domains through different values, which makes the model harder to understand. Each domain should have its own backing tag, with membership based only on the tag being present. This is a breaking change to the domain API, which is not released yet (2.0.0), so it needs to land before the release. Fixes #15016 ### Does this PR introduce _any_ user-facing change? Yes, to the unreleased 2.0.0 domain API: - Java/Python: the backing tag is a tag name (`String` / `str`) instead of `TagValue`. - REST: `backingTag` objects in domain requests and responses contain only `name` (plus `create` on creation); `value` is no longer accepted or returned. - Any existing tag can be bound regardless of its allowed values; a tag backs at most one domain. - Listener `DomainInfo.backingTag()` and `UpdateDomainBackingTag*Event.backingTag()` return the tag name. ### How was this patch tested? - New tests: an existing tag with an allowed-values list backs a domain without a value; a tag that already backs a domain cannot back another one (create, create sub-domain, update); membership ignores assignment values (`TestDomainManager`, `TestDomainMembershipResolver`, `DomainIT`, Python `test_domain.py`); requests with `value` are rejected (`TestDomainRequests`, `TestDomainBackingTagSetRequest`, `TestDomainDTO`, `TestDomainOperations`). - Updated existing unit tests and ITs for the new signatures. - `./gradlew :api:test :common:test :core:test :server:test :server-common:test :clients:client-java:test -PskipITs`, `./gradlew :docs:build`, Python client unit tests, `./gradlew :mcp-server:testPython`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
