Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 213
Direct engine fixes#5864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Direct engine fixes #5864
Changes from all commits
d4c31b6bfe52be9b6731c2c9d8a2750e7a8File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| bundle: | ||
| name: deploy-registered-models-aliases-$UNIQUE_NAME | ||
| resources: | ||
| registered_models: | ||
| my_registered_model: | ||
| name: my-registered-model-aliases-$UNIQUE_NAME | ||
| comment: $COMMENT | ||
| catalog_name: main | ||
| schema_name: default | ||
| # Aliases live on model versions and GET does not echo them back | ||
| # (DoRead uses IncludeAliases=false), so a config that sets them used to | ||
| # report a perpetual in-place update and never converge. | ||
| aliases: | ||
| - alias_name: champion | ||
| id: alias-champion |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| >>> export COMMENT=original comment | ||
| === Initial deployment with aliases set | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| === Plan is a no-op: GET never echoes aliases, so they must not drift | ||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | ||
| === The config-set aliases are skipped as input_only (confirms the matched rule) | ||
| >>> [CLI] bundle plan --output json | ||
| { | ||
| "action": "skip", | ||
| "reason": "input_only", | ||
| "old": [ | ||
| { | ||
| "alias_name": "champion", | ||
| "id": "alias-champion" | ||
| } | ||
| ], | ||
| "new": [ | ||
| { | ||
| "alias_name": "champion", | ||
| "id": "alias-champion" | ||
| } | ||
| ] | ||
| } | ||
| === Edit the comment: an in-place update, not a recreate | ||
| >>> [CLI] bundle plan | ||
| update registered_models.my_registered_model | ||
| Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| === Re-plan after the edit converges: no further changes | ||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | ||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete resources.registered_models.my_registered_model | ||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/deploy-registered-models-aliases-[UNIQUE_NAME]/default | ||
| Deleting files... | ||
| Destroy complete! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| echo "*" > .gitignore | ||
| trace export COMMENT="original comment" | ||
| envsubst < databricks.yml.tmpl > databricks.yml | ||
| cleanup() { | ||
| trace $CLI bundle destroy --auto-approve | ||
| } | ||
| trap cleanup EXIT | ||
| title "Initial deployment with aliases set" | ||
| trace $CLI bundle deploy | ||
| title "Plan is a no-op: GET never echoes aliases, so they must not drift" | ||
| trace $CLI bundle plan | contains.py "Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged" | ||
| title "The config-set aliases are skipped as input_only (confirms the matched rule)" | ||
| trace $CLI bundle plan --output json | jq '.plan[].changes.aliases' | ||
| title "Edit the comment: an in-place update, not a recreate" | ||
| export COMMENT="updated comment" | ||
| envsubst < databricks.yml.tmpl > databricks.yml | ||
| trace $CLI bundle plan | contains.py "Plan: 0 to add, 1 to change, 0 to delete" | ||
| trace $CLI bundle deploy | ||
| title "Re-plan after the edit converges: no further changes" | ||
| trace $CLI bundle plan | contains.py "Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| RecordRequests = false | ||
| # The aliases input_only classification lives in the direct engine, so scope | ||
| # this regression there. | ||
| EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| bundle: | ||
| name: lifecycle-started-edit-$UNIQUE_NAME | ||
| workspace: | ||
| root_path: ~/.bundle/$UNIQUE_NAME | ||
| resources: | ||
| sql_warehouses: | ||
| mywarehouse: | ||
| name: $UNIQUE_NAME | ||
| cluster_size: "2X-Small" | ||
| auto_stop_mins: 10 | ||
| lifecycle: | ||
| started: false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| === Deploy with started=false: warehouse created and then stopped | ||
| >>> errcode [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> print_requests.py //sql/warehouses | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/sql/warehouses", | ||
| "body": { | ||
| "auto_stop_mins": 10, | ||
| "cluster_size": "2X-Small", | ||
| "enable_photon": true, | ||
| "max_num_clusters": 1, | ||
| "name": "[UNIQUE_NAME]", | ||
| "spot_instance_policy": "COST_OPTIMIZED" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop" | ||
| } | ||
| >>> errcode [CLI] warehouses get [WAREHOUSE_ID] | ||
| "STOPPED" | ||
| === Edit a field with started=false: Edit restarts the warehouse, so a Stop must follow | ||
| >>> update_file.py databricks.yml auto_stop_mins: 10 auto_stop_mins: 20 | ||
| >>> errcode [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> print_requests.py //sql/warehouses | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/edit", | ||
| "body": { | ||
| "auto_stop_mins": 20, | ||
| "cluster_size": "2X-Small", | ||
| "enable_photon": true, | ||
| "max_num_clusters": 1, | ||
| "name": "[UNIQUE_NAME]", | ||
| "spot_instance_policy": "COST_OPTIMIZED" | ||
| } | ||
| } | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop" | ||
| } | ||
| >>> errcode [CLI] warehouses get [WAREHOUSE_ID] | ||
| "STOPPED" | ||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete resources.sql_warehouses.mywarehouse | ||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME] | ||
| Deleting files... | ||
| Destroy complete! | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| envsubst < databricks.yml.tmpl > databricks.yml | ||
| cleanup() { | ||
| trace $CLI bundle destroy --auto-approve | ||
| rm -f out.requests.txt | ||
| } | ||
| trap cleanup EXIT | ||
| title "Deploy with started=false: warehouse created and then stopped" | ||
| trace errcode $CLI bundle deploy | ||
| WAREHOUSE_ID=$($CLI bundle summary -o json | jq -r '.resources.sql_warehouses.mywarehouse.id') | ||
| add_repl.py "$WAREHOUSE_ID" "WAREHOUSE_ID" | ||
| trace print_requests.py //sql/warehouses | ||
| rm -f out.requests.txt | ||
| { trace errcode $CLI warehouses get "$WAREHOUSE_ID" | jq '.state'; } || true | ||
| # Editing a warehouse restarts it: Edit's long-running op waits for RUNNING | ||
| # (SDK WaitGetWarehouseRunning), so a started=false config must follow the Edit | ||
| # with a Stop. Before the fix this redeploy hung waiting for STOPPED. | ||
| title "Edit a field with started=false: Edit restarts the warehouse, so a Stop must follow" | ||
| trace update_file.py databricks.yml "auto_stop_mins: 10" "auto_stop_mins: 20" | ||
| trace errcode $CLI bundle deploy | ||
| trace print_requests.py //sql/warehouses | ||
| rm -f out.requests.txt | ||
| { trace errcode $CLI warehouses get "$WAREHOUSE_ID" | jq '.state'; } || true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| Local = true | ||
| RecordRequests = true | ||
| # Starting warehouses is slow, so run on cloud nightly (CloudSlow) instead of every PR | ||
| # to confirm the real Edit-restarts behaviour without per-PR timeouts. | ||
| CloudSlow = true | ||
| Ignore = [".databricks", "databricks.yml"] | ||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.