-
Notifications
You must be signed in to change notification settings - Fork 134
Config remote sync command #4289
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
base: main
Are you sure you want to change the base?
Changes from all commits
70ee529
b9d9afc
ef55090
1bf39c9
afc2e87
beba54d
d8fac50
e0bb6b1
02be4c1
ee2564d
0436a74
8ac2ba8
53066eb
d4c5744
bde1e10
b93536f
072b408
f7be4e3
fc8baf8
57842b6
9c4f04b
a51189f
2e4076f
cf867e1
dd4d5eb
2c70e2c
a8e96e6
52c71ae
2df4366
25603ef
3830ba1
e1fe23e
2335079
687ebee
72ce457
ec82ac7
09afeb5
2f1f185
e31d1c9
3695217
2fc8dc3
0fff83a
022bb5d
6ef718d
acefab4
cf60183
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Top-level comment about the bundle | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| # Resources section with extra spacing | ||
| resources: | ||
| jobs: | ||
| my_job: | ||
| # Comment about max concurrent runs | ||
| max_concurrent_runs: 1 | ||
|
|
||
| # Task configuration | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/notebook | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: i3.xlarge | ||
| num_workers: 1 # inline comment about workers | ||
|
|
||
| # Tags for categorization | ||
| tags: | ||
| env: dev # environment tag | ||
| team: data-eng |
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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Modify max_concurrent_runs from 1 to 5 | ||
| === Detect and save changesDetected changes in 1 resource(s): | ||
|
|
||
| Resource: resources.jobs.my_job | ||
| max_concurrent_runs: update | ||
|
|
||
|
|
||
| === Updated configuration | ||
| # Top-level comment about the bundle | ||
| bundle: | ||
| name: test-bundle | ||
| # Resources section with extra spacing | ||
| resources: | ||
| jobs: | ||
| my_job: | ||
| # Comment about max concurrent runs | ||
| max_concurrent_runs: 5 | ||
| # Task configuration | ||
| tasks: | ||
| - task_key: main | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/notebook | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: [NODE_TYPE_ID] | ||
| num_workers: 1 # inline comment about workers | ||
| # Tags for categorization | ||
| tags: | ||
| env: dev # environment tag | ||
| team: data-eng |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
|
|
||
| touch dummy.whl | ||
| $CLI bundle deploy | ||
| job_id="$(read_id.py my_job)" | ||
|
|
||
| title "Modify max_concurrent_runs from 1 to 5" | ||
| edit_resource.py jobs $job_id <<EOF | ||
| r["max_concurrent_runs"] = 5 | ||
| EOF | ||
|
|
||
| title "Detect and save changes" | ||
| $CLI bundle config-remote-sync --save | ||
|
|
||
| title "Updated configuration" | ||
| echo | ||
| cat databricks.yml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| RecordRequests = false | ||
| Ignore = [".databricks", "dummy.whl"] | ||
|
|
||
| [Env] | ||
| DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true" | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| email_notifications: | ||
| on_success: | ||
| - success@example.com | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO a few of these tests can be combined into one, e.g. formatting_preserved, job_email_notifications |
||
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 |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Add on_failure notifications | ||
| === Detect and save changesDetected changes in 1 resource(s): | ||
|
|
||
| Resource: resources.jobs.my_job | ||
| email_notifications.no_alert_for_skipped_runs: skip | ||
| email_notifications.on_failure: skip | ||
|
|
||
|
|
||
| === Updated configuration | ||
| bundle: | ||
| name: test-bundle | ||
| resources: | ||
| jobs: | ||
| my_job: | ||
| email_notifications: | ||
| on_success: | ||
| - success@example.com | ||
| no_alert_for_skipped_runs: true | ||
| on_failure: | ||
| - failure@example.com |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
|
|
||
| touch dummy.whl | ||
| $CLI bundle deploy | ||
| job_id="$(read_id.py my_job)" | ||
|
|
||
|
|
||
| title "Add on_failure notifications" | ||
| edit_resource.py jobs $job_id <<EOF | ||
| r["email_notifications"]["on_failure"] = ["failure@example.com"] | ||
| r["email_notifications"]["no_alert_for_skipped_runs"] = True | ||
| EOF | ||
|
|
||
| title "Detect and save changes" | ||
| $CLI bundle config-remote-sync --save | ||
|
|
||
| title "Updated configuration" | ||
| echo | ||
| cat databricks.yml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| RecordRequests = false | ||
| Ignore = [".databricks", "dummy.whl"] | ||
|
|
||
| [Env] | ||
| DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true" | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| environments: | ||
| - environment_key: default | ||
| spec: | ||
| environment_version: "3" |
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Modify job environment version from 3 to 4 | ||
| === Detect and save changesDetected changes in 1 resource(s): | ||
|
|
||
| Resource: resources.jobs.my_job | ||
| environments[0].spec.environment_version: update | ||
|
|
||
|
|
||
| === Updated configuration | ||
| bundle: | ||
| name: test-bundle | ||
| resources: | ||
| jobs: | ||
| my_job: | ||
| environments: | ||
| - environment_key: default | ||
| spec: | ||
| environment_version: "4" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
|
|
||
| touch dummy.whl | ||
| $CLI bundle deploy | ||
| job_id="$(read_id.py my_job)" | ||
|
|
||
| title "Modify job environment version from 3 to 4" | ||
| edit_resource.py jobs $job_id <<EOF | ||
| r["environments"][0]["spec"]["environment_version"] = "4" | ||
| EOF | ||
|
|
||
| title "Detect and save changes" | ||
| $CLI bundle config-remote-sync --save | ||
|
|
||
| title "Updated configuration" | ||
| echo | ||
| cat databricks.yml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| RecordRequests = false | ||
| Ignore = [".databricks", "dummy.whl"] | ||
|
|
||
| [Env] | ||
| DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true" | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| tasks: | ||
| - task_key: setup | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/setup | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: i3.xlarge | ||
| num_workers: 1 | ||
| - task_key: process | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/process | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: i3.xlarge | ||
| num_workers: 2 | ||
| depends_on: | ||
| - task_key: setup | ||
| - task_key: cleanup | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/cleanup | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: i3.xlarge | ||
| num_workers: 1 | ||
| depends_on: | ||
| - task_key: process |
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 |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Modify only 'process' task num_workers and add timeout | ||
| === Detect and save changesDetected changes in 1 resource(s): | ||
|
|
||
| Resource: resources.jobs.my_job | ||
| tasks[task_key='process'].new_cluster.num_workers: update | ||
| tasks[task_key='process'].timeout_seconds: skip | ||
|
|
||
|
|
||
| === Updated configuration | ||
| bundle: | ||
| name: test-bundle | ||
| resources: | ||
| jobs: | ||
| my_job: | ||
| tasks: | ||
| - task_key: setup | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/setup | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: [NODE_TYPE_ID] | ||
| num_workers: 1 | ||
| - task_key: process | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/process | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: [NODE_TYPE_ID] | ||
| num_workers: 5 | ||
| depends_on: | ||
| - task_key: setup | ||
| timeout_seconds: 3600 | ||
| - task_key: cleanup | ||
| notebook_task: | ||
| notebook_path: /Users/{{workspace_user_name}}/cleanup | ||
| new_cluster: | ||
| spark_version: 13.3.x-scala2.12 | ||
| node_type_id: [NODE_TYPE_ID] | ||
| num_workers: 1 | ||
| depends_on: | ||
| - task_key: process |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/bin/bash | ||
|
|
||
| touch dummy.whl | ||
| $CLI bundle deploy | ||
| job_id="$(read_id.py my_job)" | ||
|
|
||
|
|
||
| title "Modify only 'process' task num_workers and add timeout" | ||
| edit_resource.py jobs $job_id <<EOF | ||
| for task in r["tasks"]: | ||
| if task["task_key"] == "process": | ||
| task["new_cluster"]["num_workers"] = 5 | ||
| task["timeout_seconds"] = 3600 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: also delete a task in the middle to see how it copes. |
||
| EOF | ||
|
|
||
| title "Detect and save changes" | ||
| $CLI bundle config-remote-sync --save | ||
|
|
||
| title "Updated configuration" | ||
| echo | ||
| cat databricks.yml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| RecordRequests = false | ||
| Ignore = [".databricks", "dummy.whl"] | ||
|
|
||
| [Env] | ||
| DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC = "true" | ||
|
|
||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["direct"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| bundle: | ||
| name: test-bundle | ||
|
|
||
| resources: | ||
| jobs: | ||
| my_job: | ||
| parameters: | ||
| - name: catalog | ||
| default: main | ||
| - name: env | ||
| default: dev |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we record
diff old_databricks.yml new_databricks.ymlhere instead of full config? It's hard to see if there are any subtle changes there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try that, good idea