Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions site/content/in-dev/unreleased/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ The inheritance follows an override mechanism:
2. Namespace-level policies override parent namespace and catalog policies

{{< alert important >}}
Because an override completely replaces the same policy type at higher levels,
**only one instance of a given policy type can be attached to (and therefore affect) a resource**.
A resource can have at most one directly attached policy of each inheritable type.
{{< /alert >}}

## Working with Policies
Expand Down Expand Up @@ -164,35 +163,35 @@ Here is an example to find all policies that apply to a specific resource (inclu
GET /polaris/v1/catalog/applicable-policies?namespace=finance%1Fquarterly&target-name=transactions
```

The `namespace` field identifies where each policy is defined. Both policies are defined in `finance`.
The table inherits the snapshot expiry policy from that namespace and the compaction policy from the catalog.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: One suggestion on the new prose. "The table inherits the snapshot expiry policy from that namespace and the compaction policy from the catalog" can be true as scenario setup, but nothing in the sample response shows it — namespace is where the policy is defined, not where it is attached. A reader is likely to look for an attachment-point field, which is the appliedAt this PR correctly removes. Either drop that clause, or say outright that the response reports where a policy is defined and whether it was inherited, not where it is attached.

The `content` field contains a JSON string.

**Sample response:**
```json
{
"policies": [
"applicable-policies": [
{
"name": "snapshot-expiry-policy",
"type": "system.snapshot-expiry",
"appliedAt": "namespace",
"content": {
"version": "2025-02-03",
"enable": true,
"config": {
"min_snapshot_to_keep": 1,
"max_snapshot_age_days": 2,
"max_ref_age_days": 3
}
}
"policy-type": "system.snapshot-expiry",
"version": 0,
"inheritable": true,
"inherited": true,
"namespace": [
"finance"
],
"content": "{\"version\":\"2025-02-03\",\"enable\":true,\"config\":{\"min_snapshot_to_keep\":1,\"max_snapshot_age_days\":2,\"max_ref_age_days\":3}}"
},
{
"name": "compaction-policy",
"type": "system.data-compaction",
"appliedAt": "catalog",
"content": {
"version": "2025-02-03",
"enable": true,
"config": {
"target_file_size_bytes": 134217728
}
}
"policy-type": "system.data-compaction",
"version": 0,
"inheritable": true,
"inherited": true,
"namespace": [
"finance"
],
"content": "{\"version\":\"2025-02-03\",\"enable\":true,\"config\":{\"target_file_size_bytes\":134217728}}"
}
]
}
Expand Down