Skip to content
Open
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
json[0].method = "POST";
json[0].path = "/api/2.0/serving-endpoints";
json[0].body.name = "[ENDPOINT_NAME_1]";
json[1].method = "PUT";
json[1].path = "/api/2.0/permissions/serving-endpoints/[ENDPOINT_ID_1]";
json[1].body.access_control_list[0].permission_level = "CAN_MANAGE";
json[1].body.access_control_list[0].service_principal_name = "[USERNAME]";
json[1].body.access_control_list[1].permission_level = "CAN_VIEW";
json[1].body.access_control_list[1].user_name = "deco-test-user@databricks.com";

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
json[0].method = "POST";
json[0].path = "/api/2.0/serving-endpoints";
json[0].body.name = "[ENDPOINT_NAME_1]";
json[1].method = "PUT";
json[1].path = "/api/2.0/permissions/serving-endpoints/[ENDPOINT_ID_1]";
json[1].body.access_control_list[0].permission_level = "CAN_MANAGE";
json[1].body.access_control_list[0].service_principal_name = "[USERNAME]";
json[1].body.access_control_list[1].permission_level = "CAN_VIEW";
json[1].body.access_control_list[1].user_name = "deco-test-user@databricks.com";

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
json[0].method = "DELETE";
json[0].path = "/api/2.0/serving-endpoints/[ENDPOINT_NAME_1]";
json[1].method = "POST";
json[1].path = "/api/2.0/serving-endpoints";
json[1].body.name = "[ENDPOINT_NAME_2]";
json[2].method = "PUT";
json[2].path = "/api/2.0/permissions/serving-endpoints/[ENDPOINT_ID_2]";
json[2].body.access_control_list[0].permission_level = "CAN_MANAGE";
json[2].body.access_control_list[0].service_principal_name = "[USERNAME]";
json[2].body.access_control_list[1].permission_level = "CAN_VIEW";
json[2].body.access_control_list[1].user_name = "deco-test-user@databricks.com";

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
json[0].method = "PUT";
json[0].path = "/api/2.0/permissions/serving-endpoints/[ENDPOINT_ID_1]";
json[0].body.access_control_list[0].permission_level = "CAN_MANAGE";
json[0].body.access_control_list[0].user_name = "[USERNAME]";
json[1].method = "DELETE";
json[1].path = "/api/2.0/serving-endpoints/[ENDPOINT_NAME_1]";
json[2].method = "POST";
json[2].path = "/api/2.0/serving-endpoints";
json[2].body.name = "[ENDPOINT_NAME_2]";
json[3].method = "PUT";
json[3].path = "/api/2.0/permissions/serving-endpoints/[ENDPOINT_ID_2]";
json[3].body.access_control_list[0].permission_level = "CAN_MANAGE";
json[3].body.access_control_list[0].service_principal_name = "[USERNAME]";
json[3].body.access_control_list[1].permission_level = "CAN_VIEW";
json[3].body.access_control_list[1].user_name = "deco-test-user@databricks.com";

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Deploying resources...
Updating deployment state...
Deployment complete!

>>> print_requests.py //serving-endpoints

=== Print the GET endpoint details
{
"name": "[ENDPOINT_NAME_1]",
Expand All @@ -23,8 +21,6 @@ Deploying resources...
Updating deployment state...
Deployment complete!

>>> print_requests.py //serving-endpoints

=== Print the GET endpoint details
{
"name": "[ENDPOINT_NAME_2]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ trap cleanup EXIT

trace $CLI bundle plan -o json > out.first-plan.$DATABRICKS_BUNDLE_ENGINE.json
trace $CLI bundle deploy
trace print_requests.py //serving-endpoints > out.first-requests.$DATABRICKS_BUNDLE_ENGINE.json
# Sort access_control_list: the terraform engine stores it as a set whose order
# depends on the (unmasked) principal value, so it differs between the local fake
# SP and the real cloud SP. Sorting makes the recorded request stable across both.
print_requests.py //serving-endpoints | gron.py --sort-arrays access_control_list > out.first-requests.$DATABRICKS_BUNDLE_ENGINE.txt

echo "$ENDPOINT_NAME:ENDPOINT_NAME_1" >> ACC_REPLS

Expand All @@ -26,7 +29,7 @@ export ENDPOINT_NAME="test-endpoint-$UNIQUE_NAME-2"
envsubst < databricks.yml.tmpl > databricks.yml
trace $CLI bundle plan -o json > out.second-plan.$DATABRICKS_BUNDLE_ENGINE.json
trace $CLI bundle deploy
trace print_requests.py //serving-endpoints > out.second-requests.$DATABRICKS_BUNDLE_ENGINE.json
print_requests.py //serving-endpoints | gron.py --sort-arrays access_control_list > out.second-requests.$DATABRICKS_BUNDLE_ENGINE.txt

echo "$ENDPOINT_NAME:ENDPOINT_NAME_2" >> ACC_REPLS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
Local = false
Local = true
Cloud = true
RecordRequests = true
RequiresUnityCatalog = true

# Cloud goldens were recorded under a service principal, so the deployer's
# auto-added CAN_MANAGE ACL serializes as service_principal_name. Make the
# local fake report the deployer as a service principal to match.
IsServicePrincipal = true

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"]
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -73,6 +76,11 @@
"new": "other_catalog",
"remote": "main"
},
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "skip",
"reason": "empty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -56,6 +59,11 @@
"endpoint_id": "[UUID]"
},
"changes": {
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"name": {
"action": "recreate",
"reason": "id_field",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -49,6 +52,11 @@
"endpoint_id": "[UUID]"
},
"changes": {
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "recreate",
"reason": "immutable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ Deployment complete!
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -73,6 +76,11 @@
"new": "other_schema",
"remote": "default"
},
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "skip",
"reason": "empty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ORIGINAL_ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -73,6 +76,11 @@
"new": "other_table",
"remote": "my_table"
},
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "skip",
"reason": "empty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@
}
]
},
"creation_timestamp": [UNIX_TIME_MILLIS][0],
"creator": "[USERNAME]",
"description": "",
"id": "[UUID]",
"last_updated_timestamp": [UNIX_TIME_MILLIS][0],
"name": "[ENDPOINT_ID]",
"permission_level": "CAN_MANAGE",
"route_optimized": false,
Expand All @@ -72,6 +75,11 @@
"new": "second-inference-catalog",
"remote": "first-inference-catalog"
},
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "skip",
"reason": "empty",
Expand Down
Loading
Loading