Commit 4332aa0
authored
feat: New apps commands (#4247)
## Changes
### Overview
This PR adds new AppKit development commands to `databricks apps`,
making them first-class citizens alongside the auto-generated Apps API
commands. The implementation follows the same pattern established by the
`pipelines` commands.
### New Command Structure
`databricks apps` now has three command groups:
| Group | Commands | Description |
|-------|----------|-------------|
| **Available Commands** | `deploy`, `dev-remote`, `init`, `logs`,
`run-local`, `validate` | Custom development commands |
| **Management Commands** | `create`, `delete`, `get`, `list`, `start`,
`stop`, etc. | Auto-generated API commands |
| **Permission Commands** | `get-permissions`, `set-permissions`, etc. |
Permission management |
### Key Features
1. `databricks apps init` - Initialize new AppKit projects from
templates with interactive prompts, but also allowing full prompt
override via flags.
2. `databricks apps dev-remote` - Run local Vite dev server with
WebSocket bridge to remote app (this command already exists, but now has
some improvements like deriving the project from the folder and
reconnecting).
3. `databricks apps validate` - Run validation of the app running type
checking, linting and building.
4. `databricks apps deploy` - Dual-mode deployment:
- Bundle mode (when databricks.yml exists): Validates → Deploys bundle →
Runs app
- API mode: Standard API deployment with APP_NAME argument
### Directory Structure
```
cmd/apps/ # Custom commands
├── apps.go # Commands() + ManagementGroupID
├── init.go # Initialize projects
├── dev.go # Dev-remote command
├── deploy_bundle.go # Bundle-aware deploy
├── logs.go # App logs
├── run_local.go # Run locally
└── validate.go # Validate the project compiles
cmd/workspace/apps/ # Auto-generated + overrides
├── apps.go # SDK commands
├── overrides.go # Imports cmd/apps, groups commands
└── errors.go # Error handling
libs/apps/ # Shared libraries
├── features/ # Feature definitions
├── prompt/ # Interactive prompts
├── validation/ # Project validation
└── vite/ # Vite bridge
```
## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
## Tests
<!-- How have you tested the changes? -->
<!-- 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. -->
---------
Co-authored-by: MarioCadenas <MarioCadenas@users.noreply.github.com>1 parent 92646b7 commit 4332aa0
File tree
50 files changed
+4173
-274
lines changed- acceptance
- apps/deploy
- bundle-no-args
- app
- bundle-with-appname
- no-bundle-no-args
- no-bundle-with-appname
- cmd/workspace/apps
- cmd
- apps
- workspace/apps
- libs
- apps
- features
- prompt
- validation
- vite
- exec
- git
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
50 files changed
+4173
-274
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments