Skip to content

Commit 4045284

Browse files
committed
Merge branch 'main' of github.com:databricks/cli into config-sync-migrate-to-resource-yml
2 parents b4294fd + ce3b35e commit 4045284

75 files changed

Lines changed: 3458 additions & 191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2f10a6ab001e2fa2552f6b25f7fbb4a08014a43f
1+
a7c320a6b531263c8fa45619c1565b63849750e5

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ cmd/workspace/current-user/current-user.go linguist-generated=true
7777
cmd/workspace/dashboard-email-subscriptions/dashboard-email-subscriptions.go linguist-generated=true
7878
cmd/workspace/dashboard-widgets/dashboard-widgets.go linguist-generated=true
7979
cmd/workspace/dashboards/dashboards.go linguist-generated=true
80+
cmd/workspace/data-classification/data-classification.go linguist-generated=true
8081
cmd/workspace/data-quality/data-quality.go linguist-generated=true
8182
cmd/workspace/data-sources/data-sources.go linguist-generated=true
8283
cmd/workspace/database/database.go linguist-generated=true
@@ -107,6 +108,7 @@ cmd/workspace/instance-pools/instance-pools.go linguist-generated=true
107108
cmd/workspace/instance-profiles/instance-profiles.go linguist-generated=true
108109
cmd/workspace/ip-access-lists/ip-access-lists.go linguist-generated=true
109110
cmd/workspace/jobs/jobs.go linguist-generated=true
111+
cmd/workspace/knowledge-assistants/knowledge-assistants.go linguist-generated=true
110112
cmd/workspace/lakeview-embedded/lakeview-embedded.go linguist-generated=true
111113
cmd/workspace/lakeview/lakeview.go linguist-generated=true
112114
cmd/workspace/libraries/libraries.go linguist-generated=true

.github/workflows/tagging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
workflow_dispatch:
77
# No inputs are required for the manual dispatch.
88

9-
# Runs at 8:00 UTC on Tuesday, Wednesday, and Thursday. To enable automated
9+
# Runs at 8:00 UTC on Monday, Tuesday, Wednesday, and Thursday. To enable automated
1010
# tagging for a repository, simply add it to the if block of the tag job.
1111
schedule:
12-
- cron: '0 8 * * TUE,WED,THU'
12+
- cron: '0 8 * * MON,TUE,WED,THU'
1313

1414
# Ensure that only a single instance of the workflow is running at a time.
1515
concurrency:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ go.work.sum
5757

5858
# Fetched based on recorded hash
5959
.codegen/openapi.json
60+
61+
.claude/settings.local.json

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ generate:
182182
@echo "Generating CLI code..."
183183
$(GENKIT_BINARY) update-sdk
184184
cat .gitattributes.manual .gitattributes > .gitattributes.tmp && mv .gitattributes.tmp .gitattributes
185+
-go test ./acceptance -run TestAccept/bundle/refschema -update &> /dev/null
185186
@echo "Updating direct engine config..."
186187
make generate-direct
187188
go test ./bundle/internal/schema

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
* Modify grants to use SDK types ([#4666](https://github.com/databricks/cli/pull/4666))
99

1010
### Dependency updates
11+
* Bump databricks-sdk-go from v0.112.0 to v0.119.0 ([#4631](https://github.com/databricks/cli/pull/4631), [#4695](https://github.com/databricks/cli/pull/4695))
1112

1213
### API Changes

acceptance/bundle/config-remote-sync/job_fields/databricks.yml.tmpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,18 @@ resources:
2222
environment_version: "3"
2323
dependencies:
2424
- ./*.whl
25+
job_clusters:
26+
- job_cluster_key: test_cluster
27+
new_cluster:
28+
spark_version: $DEFAULT_SPARK_VERSION
29+
node_type_id: $NODE_TYPE_ID
30+
num_workers: 1
2531
tasks:
2632
- task_key: main
33+
notebook_task:
34+
notebook_path: /Users/{{workspace_user_name}}/notebook
35+
job_cluster_key: test_cluster
36+
- task_key: inline_cluster_task
2737
notebook_task:
2838
notebook_path: /Users/{{workspace_user_name}}/notebook
2939
new_cluster:

acceptance/bundle/config-remote-sync/job_fields/output.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ Detected changes in 1 resource(s):
1212
Resource: resources.jobs.my_job
1313
email_notifications.no_alert_for_skipped_runs: add
1414
email_notifications.on_failure: add
15+
job_clusters[0].job_cluster_key: replace
1516
parameters: replace
1617
tags['team']: add
18+
tasks[task_key='inline_cluster_task'].new_cluster.num_workers: replace
19+
tasks[task_key='main'].job_cluster_key: replace
1720
trigger.pause_status: add
1821
trigger.periodic: remove
1922
trigger.table_update: add
@@ -52,9 +55,25 @@ Resource: resources.jobs.my_job
5255
+ - samples.nyctaxi.trips
5356
environments:
5457
- environment_key: default
55-
@@ -31,4 +37,6 @@
58+
@@ -24,5 +30,5 @@
59+
- ./*.whl
60+
job_clusters:
61+
- - job_cluster_key: test_cluster
62+
+ - job_cluster_key: test_cluster_renamed
63+
new_cluster:
64+
spark_version: [[DEFAULT_SPARK_VERSION]]
65+
@@ -33,5 +39,5 @@
66+
notebook_task:
67+
notebook_path: /Users/{{workspace_user_name}}/notebook
68+
- job_cluster_key: test_cluster
69+
+ job_cluster_key: test_cluster_renamed
70+
- task_key: inline_cluster_task
71+
notebook_task:
72+
@@ -40,5 +46,7 @@
73+
spark_version: [[DEFAULT_SPARK_VERSION]]
5674
node_type_id: [NODE_TYPE_ID]
57-
num_workers: 1
75+
- num_workers: 1
76+
+ num_workers: 2
5877
+ tags:
5978
+ team: data
6079

acceptance/bundle/config-remote-sync/job_fields/script

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
envsubst < databricks.yml.tmpl > databricks.yml
4+
add_repl.py "$DEFAULT_SPARK_VERSION" "[DEFAULT_SPARK_VERSION]"
5+
add_repl.py "$NODE_TYPE_ID" "[NODE_TYPE_ID]"
46

57
cleanup() {
68
trace $CLI bundle destroy --auto-approve
@@ -20,6 +22,16 @@ r["email_notifications"]["no_alert_for_skipped_runs"] = True
2022
r["parameters"].append({"name": "region", "default": "us-east-1"})
2123
r["trigger"] = {"pause_status": "UNPAUSED", "table_update": {"table_names": ["samples.nyctaxi.trips"]}}
2224
25+
for cluster in r.get("job_clusters", []):
26+
if cluster.get("job_cluster_key") == "test_cluster":
27+
cluster["job_cluster_key"] = "test_cluster_renamed"
28+
for task in r.get("tasks", []):
29+
if task.get("task_key") == "inline_cluster_task" and "new_cluster" in task:
30+
task["new_cluster"]["num_workers"] = 2
31+
for task in r.get("tasks", []):
32+
if task.get("job_cluster_key") == "test_cluster":
33+
task["job_cluster_key"] = "test_cluster_renamed"
34+
2335
if "tags" not in r:
2436
r["tags"] = {}
2537
r["tags"]["team"] = "data"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
bundle:
2+
name: test-bundle-$UNIQUE_NAME
3+
4+
resources:
5+
pipelines:
6+
my_pipeline:
7+
name: test-pipeline-$UNIQUE_NAME
8+
root_path: ./pipeline_root
9+
libraries:
10+
- notebook:
11+
path: /Users/{{workspace_user_name}}/notebook
12+
13+
jobs:
14+
my_job:
15+
tasks:
16+
- task_key: main
17+
notebook_task:
18+
notebook_path: ./src/notebook.py
19+
new_cluster:
20+
spark_version: $DEFAULT_SPARK_VERSION
21+
node_type_id: $NODE_TYPE_ID
22+
num_workers: 1
23+
24+
targets:
25+
default:
26+
mode: development

0 commit comments

Comments
 (0)