Skip to content

Preserve git-backed config in bundle generate app - #6656

Merged
andrewnester merged 3 commits into
mainfrom
apps-generate-git-backed
Sep 14, 2026
Merged

Preserve git-backed config in bundle generate app#6656
andrewnester merged 3 commits into
mainfrom
apps-generate-git-backed

Conversation

@atreyadbrx

Copy link
Copy Markdown
Collaborator

Changes

databricks bundle generate app now reproduces a git-backed app's deployment configuration. When the existing app deploys from Git, it emits git_repository + git_source instead of a workspace source_code_path.

Why

ConvertAppToValue unconditionally wrote source_code_path, ignoring app.GitRepository / app.GitSource. Running bundle generate app against a git-backed app dropped the Git configuration and wrote a source_code_path pointing at a local directory with nothing downloaded (a git-backed app has no workspace default_source_code_path), silently down-converting it to broken workspace source. Now, when app.GitRepository is set, generate emits git_repository (url/provider, plus auto_deploy when set) and the git_source reference — from app.git_source, falling back to app.default_git_source. Output-only fields (resolved_commit, nested git_repository) are omitted. Workspace-source apps are unchanged.

Tests

  • Acceptance test acceptance/bundle/generate/app_git_backed: stubs a git-backed app GET and asserts the generated out.app.yml carries git_repository + git_source (no workspace source_code_path).
  • Existing bundle/generate/app acceptance tests pass unchanged.

Supersedes #6620 (accidentally opened from a fork, which forced the isolated integration-test path); this is the same change in-repo, with the review feedback incorporated.

This pull request and its description were written by Isaac.

atreyadbrx and others added 2 commits September 10, 2026 19:06
bundle generate app always emitted a workspace source_code_path, even
for an app that deploys from Git — silently converting it to workspace
source and pointing source_code_path at a local directory that has
nothing downloaded into it (a git-backed app has no workspace source to
download). Emit git_repository + git_source instead when the app is
git-backed, taking the reference from the app's git_source and falling
back to default_git_source.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: atreyadbrx <atreya.misra@databricks.com>
Per review, replace the ConvertAppToValue unit test with an acceptance
test under acceptance/bundle/generate/app_git_backed that stubs a
git-backed app GET response and asserts the generated bundle config
carries git_repository + git_source (no workspace source_code_path).

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: atreyadbrx <atreya.misra@databricks.com>
@atreyadbrx

Copy link
Copy Markdown
Collaborator Author

@andrewnester this is the in-repo version of #6620 (that one was opened from a fork by mistake, which forced the isolated integration-test flow). Same change; your review feedback is already in — the git-backed test is the acceptance test acceptance/bundle/generate/app_git_backed. In-repo now, so integration tests run the normal way. Thanks!

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 9ca3173

Run: 34825463785

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux 1 275 16 5:21
💚​ aws windows 1 277 14 2:51
💚​ azure linux 1 274 16 5:10
💚​ azure windows 1 276 14 2:53
💚​ gcp linux 1 275 16 5:25
💚​ gcp windows 1 277 14 2:50
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:59 gcp linux TestAccept
3:57 azure linux TestAccept
3:53 aws linux TestAccept
2:04 gcp windows TestAccept

@andrewnester
andrewnester added this pull request to the merge queue Sep 14, 2026
Merged via the queue into main with commit 64b6be2 Sep 14, 2026
32 of 33 checks passed
@andrewnester
andrewnester deleted the apps-generate-git-backed branch September 14, 2026 09:41
denik added a commit that referenced this pull request Sep 14, 2026
validate_nextchanges.py (the `preview` check) requires each fragment to end with
its PR link; generate-app-git.md (from #6656, now on main) lacks it, failing
preview on every open PR. Add the link it dictates.

Co-authored-by: Isaac
janniklasrose added a commit that referenced this pull request Sep 14, 2026
#6656 missed it, failing linter
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.

3 participants