Skip to content

Quickstart improvements: idempotency, Lakebase for all templates, existing app support#159

Draft
smurching wants to merge 4 commits intodatabricks:mainfrom
smurching:smurching/quickstart-improvements
Draft

Quickstart improvements: idempotency, Lakebase for all templates, existing app support#159
smurching wants to merge 4 commits intodatabricks:mainfrom
smurching:smurching/quickstart-improvements

Conversation

@smurching
Copy link
Collaborator

…sting app support

  • Experiment idempotency: reuse existing MLFLOW_EXPERIMENT_ID from .env if the experiment still exists, avoiding duplicate experiments on re-runs
  • Lakebase idempotency: skip interactive Lakebase prompt if config already in .env, printing "Reusing existing Lakebase config from .env"
  • Lakebase for non-memory templates: prompt all templates (not just memory ones) to optionally set up Lakebase for UI chat history; use clear messaging distinguishing "chat UI history" from "agent memory"
  • Existing app support: --app-name flag (+ interactive prompt) updates databricks.yml app name and prints bundle deployment bind instructions
  • New --skip-lakebase flag for CI/non-interactive use
  • New functions: get_existing_lakebase_config(), update_databricks_yml_app_name()
  • 21 new unit tests covering all new behaviors (77 total, all passing)
  • Update quickstart/SKILL.md and lakebase-setup/SKILL.md with new options, existing app scenario, idempotency notes, and Use Cases table

…sting app support

- Experiment idempotency: reuse existing MLFLOW_EXPERIMENT_ID from .env
  if the experiment still exists, avoiding duplicate experiments on re-runs
- Lakebase idempotency: skip interactive Lakebase prompt if config already
  in .env, printing "Reusing existing Lakebase config from .env"
- Lakebase for non-memory templates: prompt all templates (not just memory
  ones) to optionally set up Lakebase for UI chat history; use clear
  messaging distinguishing "chat UI history" from "agent memory"
- Existing app support: --app-name flag (+ interactive prompt) updates
  databricks.yml app name and prints bundle deployment bind instructions
- New --skip-lakebase flag for CI/non-interactive use
- New functions: get_existing_lakebase_config(), update_databricks_yml_app_name()
- 21 new unit tests covering all new behaviors (77 total, all passing)
- Update quickstart/SKILL.md and lakebase-setup/SKILL.md with new options,
  existing app scenario, idempotency notes, and Use Cases table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smurching smurching changed the title Quickstart improvements: idempotency, Lakebase for all templates, exi… Quickstart improvements: idempotency, Lakebase for all templates, existing app support Mar 14, 2026
if existing_id:
result = run_command(
[
"databricks",
Copy link
Collaborator Author

@smurching smurching Mar 23, 2026

Choose a reason for hiding this comment

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

Should we use Databricks SDK instead to e.g. fetch experiment metadata via databricks.sdk.WorkspaceClient().experiments.get_experiment(experiment_id=existing_id) etc?


# App names are always quoted (e.g. name: "agent-langgraph"); bundle names are not
updated = re.sub(
r'(\bname:\s+)["\']([^"\']*)["\']',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is this regex doing? Any way to make it easier to understand?

print_success(f"Updated databricks.yml app name to '{app_name}'")

# Extract bundle key from resources.apps section
match = re.search(r"resources:\s*\n\s+apps:\s*\n\s+(\w+):", content, re.MULTILINE)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why not use a YAML library to parse/read? Both here and elsewhere where we work with YAML?

smurching and others added 3 commits March 22, 2026 22:46
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace regex-based YAML writes in update_databricks_yml_experiment and
update_databricks_yml_app_name with ruamel.yaml, which preserves comments,
quote styles, and formatting on round-trip. Add ruamel.yaml>=0.18.0 as a
dependency to all templates and the integration test suite.

The lakebase functions (_replace_lakebase_env_vars, _replace_lakebase_resource)
still use line-based parsing since they handle commented-out YAML blocks that
ruamel represents only as comments on surrounding nodes, not as navigable nodes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test_quickstart_e2e.py: 3 scenarios (fresh-and-idempotent, existing-app,
  lakebase-idempotent) validating the full developer setup journey: git-copy
  template, run quickstart, assert .env + databricks.yml, optionally deploy
- helpers.py: add git_copy_template, read_env_value, databricks_create_app,
  databricks_delete_app; extend run_quickstart with app_name/skip_lakebase
  params; add bundle_deploy recovery for "is not terminal" state
- conftest.py: add --quickstart-only, --git-ref, --scenario CLI options
- AGENTS.md: document new test file, helpers, and CLI flags

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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