Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
70ee529
Command placeholder
ilyakuz-db Jan 14, 2026
b9d9afc
First iteration of YAML generation
ilyakuz-db Jan 14, 2026
ef55090
File writer
ilyakuz-db Jan 14, 2026
1bf39c9
Target overrides
ilyakuz-db Jan 14, 2026
afc2e87
Cleanup
ilyakuz-db Jan 14, 2026
beba54d
Fix invalid Dyn panic
ilyakuz-db Jan 15, 2026
d8fac50
Fix test to use structs
ilyakuz-db Jan 15, 2026
e0bb6b1
Cleanup
ilyakuz-db Jan 15, 2026
02be4c1
Fix missing tags issue
ilyakuz-db Jan 15, 2026
ee2564d
Fix sequences
ilyakuz-db Jan 15, 2026
0436a74
Cleanup
ilyakuz-db Jan 15, 2026
8ac2ba8
Rename
ilyakuz-db Jan 15, 2026
53066eb
Use less dyn.Value conversions
ilyakuz-db Jan 16, 2026
d4c5744
More asserts
ilyakuz-db Jan 16, 2026
bde1e10
Cleanup
ilyakuz-db Jan 16, 2026
b93536f
Fix add fields
ilyakuz-db Jan 18, 2026
072b408
Encapsulate dyn values in resolve selectors function
ilyakuz-db Jan 19, 2026
f7be4e3
Cleanup dyn logic
ilyakuz-db Jan 19, 2026
fc8baf8
Simplify patching behavior
ilyakuz-db Jan 19, 2026
57842b6
Hardcoded server side defaults
ilyakuz-db Jan 19, 2026
9c4f04b
Normalise values using SDK marshaler
ilyakuz-db Jan 19, 2026
a51189f
Cleanup
ilyakuz-db Jan 19, 2026
2e4076f
Move command to the bundle namespace
ilyakuz-db Jan 19, 2026
cf867e1
More strict errors
ilyakuz-db Jan 19, 2026
dd4d5eb
Better errors
ilyakuz-db Jan 20, 2026
2c70e2c
Fix tests
ilyakuz-db Jan 20, 2026
a8e96e6
Go mod update
ilyakuz-db Jan 20, 2026
52c71ae
Merge branch 'main' into config-remote-sync-command
ilyakuz-db Jan 20, 2026
2df4366
Remove unused argument
ilyakuz-db Jan 21, 2026
25603ef
Add terraform defaults
ilyakuz-db Jan 21, 2026
3830ba1
Update acceptance test
ilyakuz-db Jan 21, 2026
e1fe23e
Merge branch 'main' of github.com:databricks/cli into config-remote-s…
ilyakuz-db Jan 21, 2026
2335079
Remove webhook_notifications and email_notifications defaults
ilyakuz-db Jan 21, 2026
687ebee
Remove unused functions
ilyakuz-db Jan 21, 2026
72ce457
Add acceptance tests
ilyakuz-db Jan 22, 2026
ec82ac7
Stable sort for changes
ilyakuz-db Jan 22, 2026
09afeb5
Update tests
ilyakuz-db Jan 22, 2026
2f1f185
Update storage field
ilyakuz-db Jan 22, 2026
e31d1c9
Update tests
ilyakuz-db Jan 22, 2026
3695217
Update tests
ilyakuz-db Jan 22, 2026
2fc8dc3
Move tests to bundle/
ilyakuz-db Jan 22, 2026
0fff83a
Test update
ilyakuz-db Jan 22, 2026
022bb5d
Skip windows
ilyakuz-db Jan 22, 2026
6ef718d
Merge branch 'main' of github.com:databricks/cli into config-remote-s…
ilyakuz-db Jan 22, 2026
acefab4
Update test tomls
ilyakuz-db Jan 22, 2026
cf60183
Merge branch 'main' of github.com:databricks/cli into config-remote-s…
ilyakuz-db Jan 22, 2026
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
8 changes: 8 additions & 0 deletions acceptance/bin/edit_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ def set(self, job_id, value):
return run([CLI, "jobs", "reset", job_id, "--json", json.dumps(payload)])


class pipelines:
def get(self, pipeline_id):
return run_json([CLI, "pipelines", "get", pipeline_id])["spec"]

def set(self, pipeline_id, value):
return run([CLI, "pipelines", "update", pipeline_id, "--json", json.dumps(value)])


def main():
parser = argparse.ArgumentParser()
parser.add_argument("type")
Expand Down
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
Copy link
Contributor

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.yml here instead of full config? It's hard to see if there are any subtle changes there.

Copy link
Contributor Author

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

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
Copy link
Contributor

Choose a reason for hiding this comment

The 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"
17 changes: 17 additions & 0 deletions acceptance/bundle/config-remote-sync/job_environments/script
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
21 changes: 21 additions & 0 deletions acceptance/bundle/config-remote-sync/job_multiple_tasks/script
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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Loading