Skip to content

Commit 162cc17

Browse files
janniklasroseIsaac
andauthored
Distinguish "not supported" from "not deployed" in bundle summary (#6583)
`resource.GetURL() == ""` did not distinguish between "not deployed yet" and "resource does not support URLs". Add a boolean return value to the method to allow callers (`bundle summary`, `bundle open`, `pipelines open` `pipelines deploy`) to adjust the messaging. --------- Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 6995fcc commit 162cc17

56 files changed

Lines changed: 74 additions & 175 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* CLI commands no longer imply that a resource whose type has no workspace URL is merely not deployed yet. ([#6583](https://github.com/databricks/cli/pull/6583))

‎acceptance/bundle/deployment/bind/postgres_database/output.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Resources:
1313
Postgres databases:
1414
database1:
1515
Name:
16-
URL: (not deployed)
1716

1817
>>> [CLI] bundle deployment unbind database1
1918

@@ -27,4 +26,3 @@ Resources:
2726
Postgres databases:
2827
database1:
2928
Name:
30-
URL: (not deployed)

‎acceptance/bundle/deployment/bind/postgres_role/output.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Resources:
1313
Postgres roles:
1414
role1:
1515
Name:
16-
URL: (not deployed)
1716

1817
>>> [CLI] bundle deployment unbind role1
1918

@@ -27,4 +26,3 @@ Resources:
2726
Postgres roles:
2827
role1:
2928
Name:
30-
URL: (not deployed)

‎acceptance/bundle/deployment/bind/postgres_snapshot_schedule/output.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Resources:
1313
Postgres snapshot schedules:
1414
schedule1:
1515
Name: projects/test-project/branches/main/snapshot-schedule
16-
URL: (not deployed)
1716

1817
>>> [CLI] bundle deployment unbind schedule1
1918

@@ -27,4 +26,3 @@ Resources:
2726
Postgres snapshot schedules:
2827
schedule1:
2928
Name:
30-
URL: (not deployed)

‎acceptance/bundle/resources/postgres_branches/basic/output.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ Resources:
1818
Postgres branches:
1919
main:
2020
Name:
21-
URL: (not deployed)
2221
Postgres projects:
2322
my_project:
2423
Name: Test Project for Branch
25-
URL: (not deployed)
2624

2725
>>> [CLI] bundle deploy
2826
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-branch-[UNIQUE_NAME]/default/files...
@@ -59,11 +57,9 @@ Resources:
5957
Postgres branches:
6058
main:
6159
Name:
62-
URL: (not deployed)
6360
Postgres projects:
6461
my_project:
6562
Name: Test Project for Branch
66-
URL: (not deployed)
6763

6864
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
6965

‎acceptance/bundle/resources/postgres_catalogs/basic/output.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Resources:
2222
Postgres projects:
2323
my_project:
2424
Name: Test Project for Catalog
25-
URL: (not deployed)
2625

2726
>>> [CLI] bundle deploy
2827
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-catalog-[UNIQUE_NAME]/default/files...
@@ -56,7 +55,6 @@ Resources:
5655
Postgres projects:
5756
my_project:
5857
Name: Test Project for Catalog
59-
URL: (not deployed)
6058

6159
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
6260

‎acceptance/bundle/resources/postgres_databases/basic/output.txt‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@ Resources:
1818
Postgres branches:
1919
main:
2020
Name:
21-
URL: (not deployed)
2221
Postgres databases:
2322
my_database:
2423
Name:
25-
URL: (not deployed)
2624
Postgres projects:
2725
my_project:
2826
Name: Test Project for Database
29-
URL: (not deployed)
3027
Postgres roles:
3128
owner:
3229
Name:
33-
URL: (not deployed)
3430

3531
>>> [CLI] bundle deploy
3632
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-database-[UNIQUE_NAME]/default/files...
@@ -63,19 +59,15 @@ Resources:
6359
Postgres branches:
6460
main:
6561
Name:
66-
URL: (not deployed)
6762
Postgres databases:
6863
my_database:
6964
Name:
70-
URL: (not deployed)
7165
Postgres projects:
7266
my_project:
7367
Name: Test Project for Database
74-
URL: (not deployed)
7568
Postgres roles:
7669
owner:
7770
Name:
78-
URL: (not deployed)
7971

8072
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
8173

‎acceptance/bundle/resources/postgres_endpoints/basic/output.txt‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ Resources:
1818
Postgres branches:
1919
main:
2020
Name:
21-
URL: (not deployed)
2221
Postgres endpoints:
2322
custom:
2423
Name:
25-
URL: (not deployed)
2624
Postgres projects:
2725
my_project:
2826
Name: Test Project for Endpoint
29-
URL: (not deployed)
3027

3128
>>> [CLI] bundle deploy
3229
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-endpoint-[UNIQUE_NAME]/default/files...
@@ -61,15 +58,12 @@ Resources:
6158
Postgres branches:
6259
main:
6360
Name:
64-
URL: (not deployed)
6561
Postgres endpoints:
6662
custom:
6763
Name:
68-
URL: (not deployed)
6964
Postgres projects:
7065
my_project:
7166
Name: Test Project for Endpoint
72-
URL: (not deployed)
7367

7468
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
7569

‎acceptance/bundle/resources/postgres_projects/basic/output.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Resources:
1818
Postgres projects:
1919
my_project:
2020
Name: Test Postgres Project
21-
URL: (not deployed)
2221

2322
>>> [CLI] bundle deploy
2423
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-single-project-[UNIQUE_NAME]/default/files...
@@ -59,7 +58,6 @@ Resources:
5958
Postgres projects:
6059
my_project:
6160
Name: Test Postgres Project
62-
URL: (not deployed)
6361

6462
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
6563

‎acceptance/bundle/resources/postgres_roles/basic/output.txt‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ Resources:
1818
Postgres branches:
1919
main:
2020
Name:
21-
URL: (not deployed)
2221
Postgres projects:
2322
my_project:
2423
Name: Test Project for Role
25-
URL: (not deployed)
2624
Postgres roles:
2725
my_role:
2826
Name:
29-
URL: (not deployed)
3027

3128
>>> [CLI] bundle deploy
3229
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-role-[UNIQUE_NAME]/default/files...
@@ -54,6 +51,9 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged
5451
}
5552
}
5653

54+
>>> musterr [CLI] bundle open my_role
55+
Error: this resource type does not have a URL
56+
5757
>>> [CLI] bundle summary
5858
Name: deploy-postgres-role-[UNIQUE_NAME]
5959
Target: default
@@ -64,15 +64,12 @@ Resources:
6464
Postgres branches:
6565
main:
6666
Name:
67-
URL: (not deployed)
6867
Postgres projects:
6968
my_project:
7069
Name: Test Project for Role
71-
URL: (not deployed)
7270
Postgres roles:
7371
my_role:
7472
Name:
75-
URL: (not deployed)
7673

7774
>>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/
7875

0 commit comments

Comments
 (0)