Preserve git-backed config in bundle generate app - #6656
Merged
Conversation
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>
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 |
Collaborator
Integration test reportCommit: 9ca3173
Top 4 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Sep 14, 2026
andrewnester
enabled auto-merge
September 14, 2026 08:58
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
Merged
janniklasrose
added a commit
that referenced
this pull request
Sep 14, 2026
#6656 missed it, failing linter
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.
Changes
databricks bundle generate appnow reproduces a git-backed app's deployment configuration. When the existing app deploys from Git, it emitsgit_repository+git_sourceinstead of a workspacesource_code_path.Why
ConvertAppToValueunconditionally wrotesource_code_path, ignoringapp.GitRepository/app.GitSource. Runningbundle generate appagainst a git-backed app dropped the Git configuration and wrote asource_code_pathpointing at a local directory with nothing downloaded (a git-backed app has no workspacedefault_source_code_path), silently down-converting it to broken workspace source. Now, whenapp.GitRepositoryis set, generate emitsgit_repository(url/provider, plusauto_deploywhen set) and thegit_sourcereference — fromapp.git_source, falling back toapp.default_git_source. Output-only fields (resolved_commit, nestedgit_repository) are omitted. Workspace-source apps are unchanged.Tests
acceptance/bundle/generate/app_git_backed: stubs a git-backed appGETand asserts the generatedout.app.ymlcarriesgit_repository+git_source(no workspacesource_code_path).bundle/generate/appacceptance 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.