Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"full_name": "main.myschema",
"__embed__": [
{
"principal": "[USERNAME]",
"principal": "extra@example.test",
"privileges": [
"USE_SCHEMA"
"CREATE_TABLE"
]
},
{
"principal": "extra@example.test",
"principal": "[USERNAME]",
"privileges": [
"CREATE_TABLE"
"USE_SCHEMA"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ trace print_requests.py //unity-catalog/permissions --sort
grep -v 'TO_REMOVE' databricks.yml > updated.yml && mv updated.yml databricks.yml

# Generate update plan: entry.RemoteState captures both principals as GrantsState.
# remote_state.__embed__ principal order is non-deterministic (the backend, and the
# testserver mirroring it, iterate a map), so sort it by principal for a stable golden.
trace $CLI bundle plan -o json > tmp.plan.json
jq '.plan["resources.schemas.myschema.grants"]' tmp.plan.json > out.plan.grants.json
jq '.plan["resources.schemas.myschema.grants"] | .remote_state.__embed__ |= sort_by(.principal)' tmp.plan.json > out.plan.grants.json
trace print_requests.py --get //unity-catalog/permissions --sort

# Deploy from serialized plan (READPLAN=1) or without (READPLAN="").
Expand Down
Loading