Quickstart improvements: idempotency, Lakebase for all templates, existing app support#159
Draft
smurching wants to merge 4 commits intodatabricks:mainfrom
Draft
Quickstart improvements: idempotency, Lakebase for all templates, existing app support#159smurching wants to merge 4 commits intodatabricks:mainfrom
smurching wants to merge 4 commits intodatabricks:mainfrom
Conversation
…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
commented
Mar 23, 2026
| if existing_id: | ||
| result = run_command( | ||
| [ | ||
| "databricks", |
Collaborator
Author
There was a problem hiding this comment.
Should we use Databricks SDK instead to e.g. fetch experiment metadata via databricks.sdk.WorkspaceClient().experiments.get_experiment(experiment_id=existing_id) etc?
smurching
commented
Mar 23, 2026
.scripts/source/quickstart.py
Outdated
|
|
||
| # App names are always quoted (e.g. name: "agent-langgraph"); bundle names are not | ||
| updated = re.sub( | ||
| r'(\bname:\s+)["\']([^"\']*)["\']', |
Collaborator
Author
There was a problem hiding this comment.
What is this regex doing? Any way to make it easier to understand?
smurching
commented
Mar 23, 2026
.scripts/source/quickstart.py
Outdated
| 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) |
Collaborator
Author
There was a problem hiding this comment.
Why not use a YAML library to parse/read? Both here and elsewhere where we work with YAML?
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…sting app support