Skip to content

fix: improve apps deploy error when APP_NAME is missing#4820

Open
jamesbroadhead wants to merge 5 commits intodatabricks:mainfrom
jamesbroadhead:jb/improve-apps-deploy-error-message
Open

fix: improve apps deploy error when APP_NAME is missing#4820
jamesbroadhead wants to merge 5 commits intodatabricks:mainfrom
jamesbroadhead:jb/improve-apps-deploy-error-message

Conversation

@jamesbroadhead
Copy link

Summary

  • Replace the opaque accepts 1 arg(s), received 0 error with a clear message explaining that APP_NAME is required
  • Show usage, mention the databricks.yml auto-detect alternative, and suggest an app name inferred from the current directory name

Test plan

  • go test ./cmd/apps/ -run TestMakeArgsOptional passes
  • go build ./cmd/apps/ succeeds

This pull request was AI-assisted by Isaac.

The old error "accepts 1 arg(s), received 0" was unclear. The new message
explains that APP_NAME is required, shows usage, mentions the databricks.yml
alternative, and suggests an app name inferred from the current directory.

Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
@jamesbroadhead jamesbroadhead requested a review from a team as a code owner March 23, 2026 17:16
Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
Cover normal cases (app.yml, app.yaml, no config) and edge cases
(deleted cwd) to verify graceful degradation.

Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
- Check os.WriteFile error return values
- Use t.Chdir() instead of manual os.Chdir + cleanup
- Remove unnecessary testChdir helper

Co-authored-by: Isaac
Signed-off-by: James Broadhead <jamesbroadhead@gmail.com>
@github-actions
Copy link

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 4820
  • Commit SHA: 300741bd34ea0d67517e6a7aca6992187f807ece

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant