Skip to content

Commit bc10093

Browse files
authored
Added support for --bind flag in bundle generate (#3782)
## Changes Added support for --bind flag in `bundle generate` ## Why This allows us to generate and bind the resources using one command instead of 2 separate commands. ## Tests Added an acceptance test <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent e6270d3 commit bc10093

File tree

36 files changed

+425
-71
lines changed

36 files changed

+425
-71
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
### Dependency updates
1414

1515
### Bundles
16+
* Added support for --bind flag in `bundle generate` ([#3782](https://github.com/databricks/cli/pull/3782))
1617
* Add `pydabs` template replacing `experimental-jobs-as-code` template ([#3806](https://github.com/databricks/cli/pull/3806))
1718
* You can now use `python` section instead of `experimental/python` ([#3540](https://github.com/databricks/cli/pull/3540))
1819

acceptance/bundle/deployment/bind/alert/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
>>> [CLI] bundle deployment bind my_alert [UUID] --auto-approve
55
Updating deployment state...
6-
Successfully bound alert with an id '[UUID]'. Run 'bundle deploy' to deploy changes to your workspace
6+
Successfully bound alert with an id '[UUID]'
7+
Run 'bundle deploy' to deploy changes to your workspace
78

89
>>> [CLI] bundle summary
910
Name: test-bundle-$UNIQUE_NAME

acceptance/bundle/deployment/bind/cluster/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
>>> [CLI] bundle deployment bind cluster1 [CLUSTER-ID] --auto-approve
88
Updating deployment state...
9-
Successfully bound cluster with an id '[CLUSTER-ID]'. Run 'bundle deploy' to deploy changes to your workspace
9+
Successfully bound cluster with an id '[CLUSTER-ID]'
10+
Run 'bundle deploy' to deploy changes to your workspace
1011

1112
>>> [CLI] bundle deployment unbind cluster1
1213
Updating deployment state...

acceptance/bundle/deployment/bind/dashboard/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD_ID]'. Run 'bundle deploy' to deploy changes to your workspace
4+
Successfully bound dashboard with an id '[DASHBOARD_ID]'
5+
Run 'bundle deploy' to deploy changes to your workspace
56

67
>>> [CLI] bundle deploy
78
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...

acceptance/bundle/deployment/bind/dashboard/recreation/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
>>> [CLI] bundle deployment bind dashboard1 [DASHBOARD_ID] --auto-approve
33
Updating deployment state...
4-
Successfully bound dashboard with an id '[DASHBOARD_ID]'. Run 'bundle deploy' to deploy changes to your workspace
4+
Successfully bound dashboard with an id '[DASHBOARD_ID]'
5+
Run 'bundle deploy' to deploy changes to your workspace
56

67
>>> errcode [CLI] bundle deploy
78
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...

acceptance/bundle/deployment/bind/database_instance/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
>>> [CLI] bundle deployment bind database_instance1 [UUID] --auto-approve
33
Updating deployment state...
4-
Successfully bound database_instance with an id '[UUID]'. Run 'bundle deploy' to deploy changes to your workspace
4+
Successfully bound database_instance with an id '[UUID]'
5+
Run 'bundle deploy' to deploy changes to your workspace
56

67
>>> [CLI] bundle summary
78
Name: test-bundle-$UNIQUE_NAME

acceptance/bundle/deployment/bind/experiment/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
=== Substitute variables in the template
44
=== Create a pre-defined experiment
55
=== Bind experiment: Updating deployment state...
6-
Successfully bound experiment with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
6+
Successfully bound experiment with an id '[NUMID]'
7+
Run 'bundle deploy' to deploy changes to your workspace
78

89
=== Deploy bundle: Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
910
Deploying resources...

acceptance/bundle/deployment/bind/job/generate-and-bind/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ test.py
1818

1919
>>> [CLI] bundle deployment bind test_job_key [NUMID] --auto-approve
2020
Updating deployment state...
21-
Successfully bound job with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
21+
Successfully bound job with an id '[NUMID]'
22+
Run 'bundle deploy' to deploy changes to your workspace
2223

2324
>>> [CLI] bundle deploy
2425
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-generate-bind-[UNIQUE_NAME]/files...

acceptance/bundle/deployment/bind/job/job-spark-python-task/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Created job with ID: [NUMID]
55
=== Bind job:
66
>>> [CLI] bundle deployment bind foo [NUMID] --auto-approve
77
Updating deployment state...
8-
Successfully bound job with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
8+
Successfully bound job with an id '[NUMID]'
9+
Run 'bundle deploy' to deploy changes to your workspace
910

1011
=== Remove .databricks directory to simulate fresh deployment:
1112
>>> rm -rf .databricks

acceptance/bundle/deployment/bind/job/noop-job/output.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
>>> [CLI] bundle deployment bind job_1 [NUMID] --auto-approve
55
Updating deployment state...
6-
Successfully bound job with an id '[NUMID]'. Run 'bundle deploy' to deploy changes to your workspace
6+
Successfully bound job with an id '[NUMID]'
7+
Run 'bundle deploy' to deploy changes to your workspace
78

89
>>> [CLI] bundle deploy
910
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/my_project/default/files...

0 commit comments

Comments
 (0)