File tree Expand file tree Collapse file tree 12 files changed +148
-3
lines changed
acceptance/bundle/resources/grants/schemas Expand file tree Collapse file tree 12 files changed +148
-3
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "method": "PATCH",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
4+ "body": {
5+ "changes": [
6+ {
7+ "add": [
8+ "ALL_PRIVILEGES"
9+ ],
10+ "principal": "deco-test-user@databricks.com",
11+ "remove": [
12+ "ALL_PRIVILEGES"
13+ ]
14+ }
15+ ]
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "method": "GET",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
4+ }
5+ {
6+ "method": "PATCH",
7+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
8+ "body": {
9+ "changes": [
10+ {
11+ "add": [
12+ "ALL_PRIVILEGES"
13+ ],
14+ "principal": "deco-test-user@databricks.com"
15+ }
16+ ]
17+ }
18+ }
19+ {
20+ "method": "GET",
21+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
22+ }
23+ {
24+ "method": "GET",
25+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
26+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml
22
33cleanup() {
44 trace $CLI bundle destroy --auto-approve
5+ rm -f out.requests.txt
56}
67trap cleanup EXIT
78
89# The direct engine puts ALL_PRIVILEGES in both the Add and Remove lists in the PATCH request,
910# which the backend rejects with "Duplicate privileges to add and delete".
1011$CLI bundle deploy > out.deploy.$DATABRICKS_BUNDLE_ENGINE.txt 2>&1 || true
12+ print_requests.py --get //permissions --keep > out.requests.$DATABRICKS_BUNDLE_ENGINE.txt
Original file line number Diff line number Diff line change 11Badness = " direct engine fails: applyGrants() puts ALL_PRIVILEGES in both Add and Remove lists"
2- RecordRequests = false
2+ RecordRequests = true
Original file line number Diff line number Diff line change 1+ {
2+ "method": "PATCH",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
4+ "body": {
5+ "changes": [
6+ {
7+ "add": [
8+ "CREATE_TABLE"
9+ ],
10+ "principal": "deco-test-user@databricks.com",
11+ "remove": [
12+ "ALL_PRIVILEGES"
13+ ]
14+ },
15+ {
16+ "add": [
17+ "CREATE_TABLE"
18+ ],
19+ "principal": "deco-test-user@databricks.com",
20+ "remove": [
21+ "ALL_PRIVILEGES"
22+ ]
23+ }
24+ ]
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ {
2+ "method": "GET",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
4+ }
5+ {
6+ "method": "PATCH",
7+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
8+ "body": {
9+ "changes": [
10+ {
11+ "add": [
12+ "CREATE_TABLE"
13+ ],
14+ "principal": "deco-test-user@databricks.com"
15+ }
16+ ]
17+ }
18+ }
19+ {
20+ "method": "GET",
21+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
22+ }
23+ {
24+ "method": "GET",
25+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
26+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ envsubst < databricks.yml.tmpl > databricks.yml
22
33cleanup() {
44 trace $CLI bundle destroy --auto-approve
5+ rm -f out.requests.txt
56}
67trap cleanup EXIT
78
89# Same principal listed twice with the same privilege.
910trace $CLI bundle deploy
11+ print_requests.py --get //permissions --keep > out.requests.$DATABRICKS_BUNDLE_ENGINE.txt
1012trace $CLI bundle plan > out.plan.$DATABRICKS_BUNDLE_ENGINE.txt 2>&1
Original file line number Diff line number Diff line change 11Badness = " direct engine shows drift after deploy when same principal is listed twice with same privilege"
2- RecordRequests = false
2+ RecordRequests = true
Original file line number Diff line number Diff line change 1+ {
2+ "method": "PATCH",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
4+ "body": {
5+ "changes": [
6+ {
7+ "add": [
8+ "CREATE_TABLE",
9+ "CREATE_TABLE"
10+ ],
11+ "principal": "deco-test-user@databricks.com",
12+ "remove": [
13+ "ALL_PRIVILEGES"
14+ ]
15+ }
16+ ]
17+ }
18+ }
Original file line number Diff line number Diff line change 1+ {
2+ "method": "GET",
3+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
4+ }
5+ {
6+ "method": "PATCH",
7+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]",
8+ "body": {
9+ "changes": [
10+ {
11+ "add": [
12+ "CREATE_TABLE"
13+ ],
14+ "principal": "deco-test-user@databricks.com"
15+ }
16+ ]
17+ }
18+ }
19+ {
20+ "method": "GET",
21+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
22+ }
23+ {
24+ "method": "GET",
25+ "path": "/api/2.1/unity-catalog/permissions/schema/main.schema_dup_grants_[UNIQUE_NAME]"
26+ }
You can’t perform that action at this time.
0 commit comments