Skip to content

Commit 21a1444

Browse files
authored
Improve the output of bundle run when bundle is not deployed (#3652)
## Changes Improve the output of bundle run when the bundle is not deployed ## Why Makes it a bit more user-friendly, why the error appears ## Tests Acceptance tests <!-- 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 d78f88f commit 21a1444

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
* Add new Lakeflow Pipelines support for bundle generate ([#3568](https://github.com/databricks/cli/pull/3568))
1515
* Fix bundle deploy to not update permissions or grants for unbound resources ([#3642](https://github.com/databricks/cli/pull/3642))
1616
* Introduce new bundle variable: `${workspace.current_user.domain_friendly_name}` ([#3623](https://github.com/databricks/cli/pull/3623))
17+
* Improve the output of bundle run when bundle is not deployed ([#3652](https://github.com/databricks/cli/pull/3652))
1718

1819
### API Changes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Error: no deployment state. Did you forget to run 'databricks bundle deploy'?
1+
Error: resource not found or not yet deployed. Did you forget to run 'databricks bundle deploy'?
22

33

44
Exit code (musterr): 1

acceptance/bundle/run/state-wiped/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
>>> musterr [CLI] bundle run foo
3-
Error: no deployment state. Did you forget to run 'databricks bundle deploy'?
3+
Error: resource not found or not yet deployed. Did you forget to run 'databricks bundle deploy'?
44

55

66
Exit code (musterr): 1

bundle/statemgmt/state_load.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func StateToBundle(ctx context.Context, state ExportedResourcesMap, config *conf
136136

137137
func (l *load) validateState(state ExportedResourcesMap) error {
138138
if len(state) == 0 && slices.Contains(l.modes, ErrorOnEmptyState) {
139-
return errors.New("no deployment state. Did you forget to run 'databricks bundle deploy'?")
139+
return errors.New("resource not found or not yet deployed. Did you forget to run 'databricks bundle deploy'?")
140140
}
141141

142142
return nil

0 commit comments

Comments
 (0)