From 59ec379edbc9ce5aedf088da84413f5e66b87089 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Wed, 8 Apr 2026 17:56:13 +0200 Subject: [PATCH 1/2] Strip dev prefix during renames --- .../job_fields/databricks.yml.tmpl | 1 + .../config-remote-sync/job_fields/output.txt | 14 +++- .../config-remote-sync/job_fields/script | 2 + .../pipeline_fields/output.txt | 4 +- .../config-remote-sync/pipeline_fields/script | 2 + bundle/configsync/defaults.go | 30 ++++++++ bundle/configsync/diff.go | 4 +- bundle/configsync/diff_test.go | 74 +++++++++++++++++++ 8 files changed, 125 insertions(+), 6 deletions(-) diff --git a/acceptance/bundle/config-remote-sync/job_fields/databricks.yml.tmpl b/acceptance/bundle/config-remote-sync/job_fields/databricks.yml.tmpl index d2e63d7cc1..ddff699c6b 100644 --- a/acceptance/bundle/config-remote-sync/job_fields/databricks.yml.tmpl +++ b/acceptance/bundle/config-remote-sync/job_fields/databricks.yml.tmpl @@ -4,6 +4,7 @@ bundle: resources: jobs: my_job: + name: test-job-$UNIQUE_NAME email_notifications: on_success: - success@example.com diff --git a/acceptance/bundle/config-remote-sync/job_fields/output.txt b/acceptance/bundle/config-remote-sync/job_fields/output.txt index 12b9987741..2ccd025fbe 100644 --- a/acceptance/bundle/config-remote-sync/job_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/job_fields/output.txt @@ -13,6 +13,7 @@ Resource: resources.jobs.my_job email_notifications.no_alert_for_skipped_runs: add email_notifications.on_failure: add job_clusters[0].job_cluster_key: replace + name: replace parameters: replace tags['team']: add tasks[task_key='inline_cluster_task'].new_cluster.num_workers: replace @@ -28,7 +29,12 @@ Resource: resources.jobs.my_job >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml -@@ -8,13 +8,19 @@ +@@ -5,20 +5,26 @@ + jobs: + my_job: +- name: test-job-[UNIQUE_NAME] ++ name: renamed-job-[UNIQUE_NAME] + email_notifications: on_success: - success@example.com + no_alert_for_skipped_runs: true @@ -55,21 +61,21 @@ Resource: resources.jobs.my_job + - samples.nyctaxi.trips environments: - environment_key: default -@@ -24,5 +30,5 @@ +@@ -27,5 +33,5 @@ - ./*.whl job_clusters: - - job_cluster_key: test_cluster + - job_cluster_key: test_cluster_renamed new_cluster: spark_version: [[DEFAULT_SPARK_VERSION]] -@@ -33,5 +39,5 @@ +@@ -36,5 +42,5 @@ notebook_task: notebook_path: /Users/{{workspace_user_name}}/notebook - job_cluster_key: test_cluster + job_cluster_key: test_cluster_renamed - task_key: inline_cluster_task notebook_task: -@@ -40,5 +46,7 @@ +@@ -43,5 +49,7 @@ spark_version: [[DEFAULT_SPARK_VERSION]] node_type_id: [NODE_TYPE_ID] - num_workers: 1 diff --git a/acceptance/bundle/config-remote-sync/job_fields/script b/acceptance/bundle/config-remote-sync/job_fields/script index 8d600aaeaa..264304d734 100755 --- a/acceptance/bundle/config-remote-sync/job_fields/script +++ b/acceptance/bundle/config-remote-sync/job_fields/script @@ -17,6 +17,8 @@ job_id="$(read_id.py my_job)" title "Modify job fields remotely" echo edit_resource.py jobs $job_id < Date: Thu, 9 Apr 2026 13:07:34 +0200 Subject: [PATCH 2/2] Regenerate acceptance test outputs for config-remote-sync Co-authored-by: Isaac --- .../bundle/config-remote-sync/job_fields/output.txt | 8 ++++---- .../bundle/config-remote-sync/pipeline_fields/output.txt | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/acceptance/bundle/config-remote-sync/job_fields/output.txt b/acceptance/bundle/config-remote-sync/job_fields/output.txt index 2ccd025fbe..fb45fd6daa 100644 --- a/acceptance/bundle/config-remote-sync/job_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/job_fields/output.txt @@ -29,7 +29,7 @@ Resource: resources.jobs.my_job >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml -@@ -5,20 +5,26 @@ +@@ -5,17 +5,23 @@ jobs: my_job: - name: test-job-[UNIQUE_NAME] @@ -61,21 +61,21 @@ Resource: resources.jobs.my_job + - samples.nyctaxi.trips environments: - environment_key: default -@@ -27,5 +33,5 @@ +@@ -25,5 +31,5 @@ - ./*.whl job_clusters: - - job_cluster_key: test_cluster + - job_cluster_key: test_cluster_renamed new_cluster: spark_version: [[DEFAULT_SPARK_VERSION]] -@@ -36,5 +42,5 @@ +@@ -34,5 +40,5 @@ notebook_task: notebook_path: /Users/{{workspace_user_name}}/notebook - job_cluster_key: test_cluster + job_cluster_key: test_cluster_renamed - task_key: inline_cluster_task notebook_task: -@@ -43,5 +49,7 @@ +@@ -41,5 +47,7 @@ spark_version: [[DEFAULT_SPARK_VERSION]] node_type_id: [NODE_TYPE_ID] - num_workers: 1 diff --git a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt index 9f612ecb78..e14b94f76f 100644 --- a/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt +++ b/acceptance/bundle/config-remote-sync/pipeline_fields/output.txt @@ -24,7 +24,9 @@ Resource: resources.pipelines.my_pipeline >>> diff.py databricks.yml.backup databricks.yml --- databricks.yml.backup +++ databricks.yml -@@ -7,18 +7,25 @@ +@@ -5,20 +5,27 @@ + pipelines: + my_pipeline: - name: test-pipeline-[UNIQUE_NAME] + name: renamed-pipeline-[UNIQUE_NAME] catalog: main