This is an automated email from the ASF dual-hosted git repository.

jerryshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git

commit 71b73e280e61193706020047ed527dda93085f8e
Author: Jerry Shao <[email protected]>
AuthorDate: Thu Nov 12 22:04:56 2026 +0800

    [#13864] fix(python): Account for Domain operations in semantic model lint 
checks
---
 clients/client-python/gravitino/client/generic_model.py           | 4 +++-
 clients/client-python/gravitino/client/generic_semantic_model.py  | 4 +++-
 core/src/main/java/org/apache/gravitino/domain/DomainManager.java | 1 +
 docs/open-api/domains.yaml                                        | 6 ++++++
 docs/open-api/roles.yaml                                          | 1 -
 5 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/clients/client-python/gravitino/client/generic_model.py 
b/clients/client-python/gravitino/client/generic_model.py
index ef4a65c54d..9c86929fa6 100644
--- a/clients/client-python/gravitino/client/generic_model.py
+++ b/clients/client-python/gravitino/client/generic_model.py
@@ -48,7 +48,9 @@ from gravitino.namespace import Namespace
 from gravitino.utils import HTTPClient
 
 
-class GenericModel(Model, SupportsTags, SupportsDomains, SupportsPolicies, 
SupportsSecrets):
+class GenericModel(
+    Model, SupportsTags, SupportsDomains, SupportsPolicies, SupportsSecrets
+):
     _model_dto: ModelDTO
     """The model DTO object."""
 
diff --git a/clients/client-python/gravitino/client/generic_semantic_model.py 
b/clients/client-python/gravitino/client/generic_semantic_model.py
index fbbf9fa240..5a577d8516 100644
--- a/clients/client-python/gravitino/client/generic_semantic_model.py
+++ b/clients/client-python/gravitino/client/generic_semantic_model.py
@@ -42,7 +42,9 @@ from gravitino.namespace import Namespace
 from gravitino.utils import HTTPClient
 
 
-class GenericSemanticModel(SemanticModel, SupportsTags, SupportsDomains, 
SupportsPolicies):
+class GenericSemanticModel(
+    SemanticModel, SupportsTags, SupportsDomains, SupportsPolicies
+):  # pylint: disable=too-many-instance-attributes
     """An immutable client-side Semantic Model returned by the Gravitino REST 
API."""
 
     def __init__(
diff --git a/core/src/main/java/org/apache/gravitino/domain/DomainManager.java 
b/core/src/main/java/org/apache/gravitino/domain/DomainManager.java
index a035b0a35d..8e38e4b78d 100644
--- a/core/src/main/java/org/apache/gravitino/domain/DomainManager.java
+++ b/core/src/main/java/org/apache/gravitino/domain/DomainManager.java
@@ -479,6 +479,7 @@ public class DomainManager implements DomainDispatcher {
         backingTag.name(),
         name);
     if (createBackingTag) {
+      // Convert only to validate the new tag name before writing the domain 
or tag.
       NameIdentifierUtil.toMetadataObject(
           NameIdentifierUtil.ofTag(metalake, backingTag.name()), 
Entity.EntityType.TAG);
     }
diff --git a/docs/open-api/domains.yaml b/docs/open-api/domains.yaml
index bd512b1c30..4de33cd026 100644
--- a/docs/open-api/domains.yaml
+++ b/docs/open-api/domains.yaml
@@ -125,6 +125,8 @@ paths:
             application/vnd.gravitino.v1+json:
               schema:
                 $ref: "#/components/schemas/DomainResponse"
+        "400":
+          $ref: "#/components/responses/BadRequestResponse"
         "403":
           description: The caller lacks the required domain, object or 
backing-tag permission.
           content:
@@ -250,6 +252,8 @@ paths:
             application/vnd.gravitino.v1+json:
               schema:
                 $ref: "#/components/schemas/DomainDropResponse"
+        "400":
+          $ref: "#/components/responses/BadRequestResponse"
         "403":
           description: The caller lacks the required domain, object or 
backing-tag permission.
           content:
@@ -428,6 +432,8 @@ paths:
                 oneOf:
                   - $ref: "#/components/schemas/DomainNameListResponse"
                   - $ref: "#/components/schemas/DomainListResponse"
+        "400":
+          $ref: "#/components/responses/BadRequestResponse"
         "403":
           description: The caller lacks the required domain, object or 
backing-tag permission.
           content:
diff --git a/docs/open-api/roles.yaml b/docs/open-api/roles.yaml
index b95040143c..63dea88d53 100644
--- a/docs/open-api/roles.yaml
+++ b/docs/open-api/roles.yaml
@@ -275,7 +275,6 @@ components:
             - "ROLE"
             - "MODEL"
             - "SEMANTIC_MODEL"
-            - "DOMAIN"
             - "FUNCTION"
             - "TAG"
             - "POLICY"

Reply via email to