Skip to content

Commit b2e33e1

Browse files
committed
direct: narrow grants fix to ALL_PRIVILEGES collapse
Drop the privilege case/ordering normalization (uppercase, space-to-underscore, dedupe, testserver random order, invariant config) from this PR: the reporter's plan showed the drift is purely ALL_PRIVILEGES coexistence, and both AWS and Azure already return privileges uppercased and sorted, so that normalization is speculative. Keep only normalizeAssignments sorting + collapsing ALL_PRIVILEGES, which is what #6030 needs. The dropped work is preserved on the denik/grants-normalization branch for a follow-up.
1 parent e7285db commit b2e33e1

15 files changed

Lines changed: 33 additions & 99 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed spurious `update` on catalog/schema/volume grants (direct engine): a principal granted `ALL_PRIVILEGES` no longer drifts when the backend also reports the concrete privileges it implies ([#6030](https://github.com/databricks/cli/issues/6030)).

‎.nextchanges/bundles/grants-normalization.md‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎acceptance/bundle/invariant/configs/grants_privilege_normalization.yml.tmpl‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎acceptance/bundle/invariant/continue_293/out.test.toml‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎acceptance/bundle/invariant/delete_idempotent/out.test.toml‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎acceptance/bundle/invariant/destroy_idempotent/out.test.toml‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎acceptance/bundle/invariant/migrate/out.test.toml‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎acceptance/bundle/invariant/no_drift/out.test.toml‎

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎acceptance/bundle/invariant/test.toml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ EnvMatrix.INPUT_CONFIG = [
3535
"experiment.yml.tmpl",
3636
"external_location.yml.tmpl",
3737
"genie_space.yml.tmpl",
38-
"grants_privilege_normalization.yml.tmpl",
3938
"instance_pool.yml.tmpl",
4039
"job.yml.tmpl",
4140
"job_pydabs_10_tasks.yml.tmpl",

‎acceptance/bundle/resources/grants/catalogs/script‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trace print_requests.py //permissions > out.deploy1.requests.$DATABRICKS_BUNDLE_
99
trace $CLI bundle plan
1010

1111
# Since we're sending different requests between terraform and direct, assert that the end result is the same:
12-
trace $CLI grants get catalog catalog_grants_$UNIQUE_NAME | jq --sort-keys '(.privilege_assignments[].privileges) |= sort'
12+
trace $CLI grants get catalog catalog_grants_$UNIQUE_NAME | jq --sort-keys
1313

1414
update_file.py databricks.yml CREATE_SCHEMA USE_SCHEMA
1515

@@ -18,7 +18,7 @@ trace print_requests.py --get //permissions
1818
trace $CLI bundle deploy
1919
trace print_requests.py //permissions > out.deploy2.requests.$DATABRICKS_BUNDLE_ENGINE.json
2020

21-
trace $CLI grants get catalog catalog_grants_$UNIQUE_NAME | jq --sort-keys '(.privilege_assignments[].privileges) |= sort'
21+
trace $CLI grants get catalog catalog_grants_$UNIQUE_NAME | jq --sort-keys
2222

2323
trace $CLI bundle destroy --auto-approve
2424
trace print_requests.py //permissions > out.destroy.requests.$DATABRICKS_BUNDLE_ENGINE.json

0 commit comments

Comments
 (0)