Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bundle:
name: test-bundle
name: $UNIQUE_NAME
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] App name my-app is still hardcoded

The bundle name is now parameterized (fixing deploy locks), but the app resource name my-app (line 24) remains hardcoded. If a prior run fails after creating the app but before bundle destroy, the next run could hit RESOURCE_ALREADY_EXISTS. The sibling tests (compute_size, git_source) already parameterize the app name as app-$UNIQUE_NAME and include cleanup traps.

This is orthogonal to the PR's stated goal (deploy locks are fixed correctly), but worth addressing as a follow-up for consistency with sibling tests.

Suggestion: Consider parameterizing the app name and adding a trap cleanup EXIT handler as a follow-up.


permissions:
- level: CAN_MANAGE
Expand Down
8 changes: 4 additions & 4 deletions acceptance/bundle/apps/job_permissions/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Expand All @@ -10,7 +10,7 @@ Deployment complete!

=== After second deploy
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Expand All @@ -20,7 +20,7 @@ false

=== Apply fix and redeploy
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Expand All @@ -33,7 +33,7 @@ The following resources will be deleted:
delete resources.apps.my_app
delete resources.jobs.my_job

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/default

Deleting files...
Destroy complete!
1 change: 1 addition & 0 deletions acceptance/bundle/apps/job_permissions/script
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Test that app-granted permissions on a job survive a second deploy.
# Issue: https://github.com/databricks/cli/issues/4309

envsubst < databricks.yml.tmpl > databricks.yml
trace $CLI bundle deploy

job_id=$(read_id.py my_job)
Expand Down
Loading