You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "markhoerth (via GitHub)" <gi...@apache.org> on 2026/08/02 20:02:36 UTC

[PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

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

   ### What changes were proposed in this pull request?
   
   Adds two concept pages and reduces two existing pages to the API surface.
   
   New: `docs/tags.md` and `docs/policies.md`. Each covers what the object is, which
   metadata object types can carry one, how inheritance resolves and how to tell a
   direct attachment from an inherited one, the privileges involved, and how to work
   with it in the UI.
   
   Changed: `manage-tags-in-gravitino.md` and `manage-policies-in-gravitino.md` keep
   their slugs and now cover the API only. The concept material moves to the new
   pages, and each links to its counterpart. The tag page gains Python examples for
   every operation, which it never had, and the policy page states that the Python
   client does not cover policies. The curl tab is relabeled from Shell to REST,
   keeping `value="shell"` so tab sync and existing `?language=shell` links still
   work.
   
   The two new pages are not in the sidebar yet. `sidebars.ts` lives in
   gravitino-site, so a companion PR there makes them reachable.
   
   ### Why are the changes needed?
   
   Tags and policies had no concept page anywhere in the doc set. Catalog-delivered
   object types get a concept page plus a "Manage X" API page, but these two got only
   the API layer, so what a tag is, what can carry one, and how inheritance resolves
   were buried in an `:::info` block partway down an API reference.
   
   Several claims on the old pages were also wrong or missing. Policies cover six
   object types and tags nine, which neither page contrasted. The `enabled` flag is a
   marker Gravitino does not act on, which was stated 200 lines below where a reader
   creates one. Only service admins can create metalakes and only owners can alter
   policies, which no page mentioned.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Documentation only. No API, property, or behavior changes. Two new pages at
   `/tags` and `/policies`; the two existing pages keep their slugs, so no links
   break.
   
   ### How was this patch tested?
   
   Every claim was checked against the source rather than carried over from the
   existing pages, including the taggable and policy-able type sets in `TagManager`
   and `PolicyManager`, the privilege bindings in `Privileges`, the authorization
   expressions on the REST operations, and the client method coverage in
   `clients/client-java` and `clients/client-python`. UI behavior was checked against
   `web-v2`. Cross-page links were verified to resolve against files in the repo.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #12326:
URL: https://github.com/apache/gravitino/pull/12326#issuecomment-5165159607

   @markhoerth can you please rebase the PR to fix the conflicts?


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "markhoerth (via GitHub)" <gi...@apache.org>.
markhoerth commented on code in PR #12326:
URL: https://github.com/apache/gravitino/pull/12326#discussion_r3700230364


##########
docs/manage-policies-in-gravitino.md:
##########
@@ -11,74 +10,33 @@ import TabItem from '@theme/TabItem';
 
 ## Introduction
 
-Starting from 1.0.0, Gravitino introduces a new policy system that allows you to manage policies for
-metadata objects. Policies are a set of rules that can be associated with a metadata
-object for data governance and similar purposes.
-
-This document provides a brief introduction to using policies in Gravitino, covering both the Gravitino Java client and 
-REST APIs. If you want to know more about the policy system in Gravitino, refer to the
-Javadoc and REST API documentation.
-
-:::info
-1. Metadata objects are objects that are managed in Gravitino, such as `CATALOG`, `SCHEMA`, `TABLE`,
-   `FILESET`, `TOPIC`, and `MODEL`. A metadata object is combined by a `type` and a dot-separated
-   `name`. For example, a `CATALOG` object has a name "catalog1" with type "CATALOG", a `SCHEMA`
-   object has a name "catalog1.schema1" with type "SCHEMA", a `TABLE` object has a name
-   "catalog1.schema1.table1" with type "TABLE".
-2`CATALOG`, `SCHEMA`, `TABLE`, `FILESET`, `TOPIC`, and `MODEL` objects can be
-   associated with policies. 
-3. Policies in Gravitino are inheritable, so listing policies of a metadata object will also list the
-   policies of its parent metadata objects. For example, listing policies of a `Table` will also list
-   the policies of its parent `Schema` and `Catalog`. For catalogs that support multi-level
-   (hierarchical) schemas, such as a schema named `a:b:c` (using the configured schema separator),
-   the intermediate parent schemas `a:b` and `a` are also part of the hierarchy, so their policies
-   are inherited as well.
-4. The same policy can be associated with both parent and child metadata objects. But when you list the
-   associated policies of a child metadata object, this policy will be included only once in the result
-   list with `inherited` value `false`.
-:::
+This page covers the policy API. For what a policy is, which object types can carry one, what goes in

Review Comment:
   ```suggestion
   This page covers the Gravitino API for policies. For what a policy is, which object types can carry one, what goes in
   ```



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on PR #12326:
URL: https://github.com/apache/gravitino/pull/12326#issuecomment-5164080398

   Hi Mark. I think it is also important to figure out how to reorganize the pages in the left sidebar for all the refactored content. It doesn't need to happen right now in this repo. But we'd also need to think a bit on this.


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "markhoerth (via GitHub)" <gi...@apache.org>.
markhoerth commented on code in PR #12326:
URL: https://github.com/apache/gravitino/pull/12326#discussion_r3700231392


##########
docs/manage-tags-in-gravitino.md:
##########
@@ -11,55 +10,24 @@ import TabItem from '@theme/TabItem';
 
 ## Introduction
 
-Starting from 0.6.0, Gravitino introduces a new tag system that allows you to manage tags for
-metadata objects. Tags are a way to categorize and organize metadata objects in Gravitino.
-
-This document briefly introduces how to use tags in Gravitino by both Gravitino Java client and
-REST APIs. If you want to know more about the tag system in Gravitino, refer to the
-Javadoc and REST API documentation.
-
-Note that current tag system is a basic implementation, some advanced features will be added in
-the future versions.
-
-:::info
-1. Metadata objects are objects that are managed in Gravitino, such as `CATALOG`, `SCHEMA`, `TABLE`,
-   `VIEW`, `FUNCTION`, `FILESET`, `TOPIC`, `COLUMN`, `MODEL`, etc. A metadata object is combined by a
-   `type` and a dot-separated `name`. For example, a `CATALOG` object has a name "catalog1" with type
-   "CATALOG", a `SCHEMA` object has a name "catalog1.schema1" with type "SCHEMA", a `TABLE`
-   object has a name "catalog1.schema1.table1" with type "TABLE", a `COLUMN` object has a name 
-   "catalog1.schema1.table1.column1" with type "COLUMN".
-2. `CATALOG`, `SCHEMA`, `TABLE`, `VIEW`, `FUNCTION`, `FILESET`, `TOPIC`, `MODEL`, and `COLUMN`
-   objects can be tagged.
-3. Tags in Gravitino is inheritable, so listing tags of a metadata object will also list the
-   tags of its parent metadata objects. For example, listing tags of a `Table` will also list
-   the tags of its parent `Schema` and `Catalog`. For catalogs that support multi-level
-   (hierarchical) schemas, such as a schema named `a:b:c` (using the configured schema
-   separator), the intermediate parent schemas `a:b` and `a` are also part of the hierarchy, so
-   their tags are inherited as well.
-4. The same tag can be associated with both parent and child metadata objects. But when you list the
-   associated tags of a child metadata object, this tag will be included only once in the result
-   list with `inherited` value `false`.
-:::
+This page covers the tag API. For what a tag is, which object types can carry one, how inheritance

Review Comment:
   ```suggestion
   This page covers the Gravitino API for tags. For what a tag is, which object types can carry one, how inheritance
   ```



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12326:
URL: https://github.com/apache/gravitino/pull/12326#issuecomment-5160507301

   <!-- coverage-report -->
   ### Code Coverage Report
   |Overall Project|68.02%|:green_circle:|
   |:-|:-|:-:|
   |Files changed|No Java source files changed|-|
   <br>
   
   |Module|Coverage||
   |:-|:-|:-:|
   |aliyun|1.72%|:red_circle:|
   |api|48.75%|:green_circle:|
   |authorization-common|85.96%|:green_circle:|
   |aws|42.04%|:green_circle:|
   |azure|2.47%|:red_circle:|
   |catalog-common|9.92%|:red_circle:|
   |catalog-fileset|79.74%|:green_circle:|
   |catalog-glue|66.91%|:green_circle:|
   |catalog-hive|79.4%|:green_circle:|
   |catalog-jdbc-common|45.7%|:green_circle:|
   |catalog-jdbc-doris|81.8%|:green_circle:|
   |catalog-jdbc-mysql|79.33%|:green_circle:|
   |catalog-jdbc-postgresql|83.39%|:green_circle:|
   |catalog-jdbc-starrocks|79.16%|:green_circle:|
   |catalog-kafka|77.01%|:green_circle:|
   |catalog-lakehouse-generic|59.18%|:green_circle:|
   |catalog-lakehouse-hudi|79.1%|:green_circle:|
   |catalog-lakehouse-iceberg|85.86%|:green_circle:|
   |catalog-lakehouse-paimon|84.23%|:green_circle:|
   |catalog-model|77.72%|:green_circle:|
   |cli|44.5%|:green_circle:|
   |client-java|78.27%|:green_circle:|
   |common|52.07%|:green_circle:|
   |core|82.96%|:green_circle:|
   |filesystem-hadoop3|77.28%|:green_circle:|
   |flink|0.0%|:red_circle:|
   |flink-common|48.68%|:green_circle:|
   |flink-runtime|0.0%|:red_circle:|
   |gcp|14.12%|:red_circle:|
   |hadoop-auth|68.0%|:green_circle:|
   |hadoop-common|12.7%|:red_circle:|
   |hive-metastore-common|53.4%|:green_circle:|
   |iceberg-common|64.75%|:green_circle:|
   |iceberg-rest-server|74.95%|:green_circle:|
   |idp-basic|86.02%|:green_circle:|
   |integration-test-common|0.0%|:red_circle:|
   |jobs|66.17%|:green_circle:|
   |lance-common|20.67%|:red_circle:|
   |lance-rest-server|64.23%|:green_circle:|
   |lineage|53.02%|:green_circle:|
   |optimizer|83.17%|:green_circle:|
   |optimizer-api|21.95%|:red_circle:|
   |server|85.89%|:green_circle:|
   |server-common|76.38%|:green_circle:|
   |spark|28.57%|:red_circle:|
   |spark-common|45.89%|:green_circle:|
   |tencent|69.84%|:green_circle:|
   |trino-connector|40.29%|:green_circle:|
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Split tags and policies into concept and API pages [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao merged PR #12326:
URL: https://github.com/apache/gravitino/pull/12326


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org