Skip to content

Add new Apps Deployment skill — full lifecycle via MCP tools and CLI#223

Open
CheeYuTan wants to merge 1 commit intodatabricks-solutions:mainfrom
CheeYuTan:feat/apps-deployment-skill
Open

Add new Apps Deployment skill — full lifecycle via MCP tools and CLI#223
CheeYuTan wants to merge 1 commit intodatabricks-solutions:mainfrom
CheeYuTan:feat/apps-deployment-skill

Conversation

@CheeYuTan
Copy link
Contributor

Summary

New skill documenting the Databricks Apps deployment lifecycle: list → create → upload → deploy → verify → logs → debug → delete.

Why this is needed: Existing skills (databricks-app-python, databricks-app-apx) cover building apps but not the deployment operations. There are 6 MCP tools for app management (list_apps, get_app, get_app_logs, create_app, deploy_app, delete_app) with zero skill documentation.

What's in the skill (310 lines)

  • MCP Tools Reference — all 6 tools with correct parameters, types, defaults, and CLI equivalents
  • Deployment Lifecycle — 7-step walkthrough with verified response shapes
  • CLI Fallback Commands — for when MCP tools have bugs
  • Troubleshooting — 9 real error messages with causes and fixes
  • Status Reference — 3 separate tables for compute_status, app_status, and deployment.status

Test evidence — 10 iterations of test-and-fix

This skill was tested through 10 iterations against a live Databricks workspace. Each iteration tested a claim, and if it failed, the skill was fixed and retested.

Full E2E lifecycle test

Step Tool Input Result Status
1 list_apps {limit: 5} Returned 5 apps with name, URL, status, deployments PASS
2 create_app (MCP) {name: "skill-test-app"} SDK error — but app created server-side BUG documented
2b create_app (CLI) databricks apps create skill-verify-test Created successfully, compute_status.state = STARTING PASS
3 get_app {name: "skill-test-app"} Returned full details, ACTIVE, no active_deployment PASS
4 upload_folder minimal app.yaml + main.py Uploaded 2 files to workspace PASS
5 deploy_app (MCP) {app_name: ..., source_code_path: ...} SDK error — KeyError on source_code_path BUG documented
5b deploy_app (CLI) databricks apps deploy ... --source-code-path ... Deployed successfully PASS
6 get_app (poll) {name: "skill-test-app"} deployment.status.state = SUCCEEDED PASS
7 get_app_logs (MCP) {app_name: "skill-test-app"} Import error: get_api_client BUG documented
7b get_app_logs (CLI) databricks apps logs skill-test-app Returned logs with [SYSTEM]/[APP] prefixes PASS
8 delete_app {name: "skill-test-app"} Returns full app object with DELETING state PASS
9 get_app (verify) {name: "skill-test-app"} DELETINGdoes not exist or is deleted PASS

What the 10 iterations found and fixed

Iteration What was wrong Fix
2 Response shapes used flat enum strings (ComputeState.ACTIVE) — real API uses nested objects (compute_status.state: "ACTIVE") Rewrote all response structures
3 CLI create uses positional NAME, not --name Fixed all CLI commands
5 Delete response was {"message": "deleted"} — real API returns full app object with DELETING state Fixed delete section
5 Can't delete while STARTING — undocumented Added to troubleshooting
6 Deployment mode was AppDeploymentMode.SNAPSHOT — real value is "SNAPSHOT" Fixed
9 app_status field only in get_app, not list_apps Clarified

3 MCP tool bugs discovered and documented

Tool Bug Workaround
create_app SDK v0.49.0 expects App object, not kwargs CLI: databricks apps create <name>
deploy_app SDK expects AppDeployment object, not flat params CLI: databricks apps deploy <name> --source-code-path <path>
get_app_logs cannot import name 'get_api_client' CLI: databricks apps logs <name>

Test plan

  • CI validation passes (validate_skills.py — 27 skills)
  • SKILL.md frontmatter valid (name: 27 chars, description: 284 chars)
  • Registered in install_skills.sh (DATABRICKS_SKILLS + description)
  • Full E2E lifecycle: create → deploy → verify → logs → delete → confirm
  • All response shapes verified against real API responses
  • All CLI fallback commands verified
  • All 9 troubleshooting errors are real (observed or documented)
  • Test apps cleaned up after testing

New skill documenting the Databricks Apps deployment lifecycle:
list → create → upload → deploy → verify → logs → debug → delete

Tested end-to-end against a live workspace with 10 iterations of
test-and-fix. Key findings from testing:

- Response shapes use nested objects (compute_status.state, not flat
  enum strings) — verified against real API responses
- 3 MCP tool bugs discovered and documented with CLI workarounds:
  create_app (SDK param mismatch), deploy_app (same), get_app_logs
  (import error)
- list_apps, get_app, delete_app work correctly via MCP
- Documented STARTING/DELETING transient states, 300-app workspace
  limit, cannot-delete-while-STARTING behavior
- CLI fallback commands verified with correct positional syntax
- Log format [SYSTEM]/[APP] prefixes verified from real app logs
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