From 1b64918ef994894c759705f848eb3638c31a48d4 Mon Sep 17 00:00:00 2001 From: atreyadbrx Date: Thu, 27 Aug 2026 18:41:49 +0000 Subject: [PATCH 1/3] template: show git-backed deployment in scaffolded databricks.yml Add a commented git_repository/git_source example to the scaffolded app bundle so developers can deploy from a Git repository/ref instead of uploading local files (reproducible, reviewable, roll-back-able). Proposal to steer AppKit apps toward git-backed deployment; see the PR description for the fuller direction (making it the default via `apps init` repo detection, which needs a coupled CLI change). Co-authored-by: Isaac Signed-off-by: atreyadbrx --- template/databricks.yml.tmpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/template/databricks.yml.tmpl b/template/databricks.yml.tmpl index a646a4376..bf1773d26 100644 --- a/template/databricks.yml.tmpl +++ b/template/databricks.yml.tmpl @@ -13,6 +13,17 @@ resources: description: "{{.appDescription}}" source_code_path: ./ + # Git-backed deployment (recommended): deploy from a Git repository/ref + # instead of uploading local files — reproducible, reviewable, and + # roll-back-able. Once the app is in a repo, replace `source_code_path` + # above with the block below (see the databricks-apps skill's git gate). + # git_repository: + # url: https://github.com/my-org/my-repo + # provider: gitHub # gitHub, gitHubEnterprise, gitLab, bitbucketCloud, ... + # git_source: + # branch: main # or tag: / commit: + # source_code_path: ./ # repo-relative path; omit for repo root + # Start the app automatically on deploy. lifecycle: started: true From 5894e34e18a31fdee9961cd3aa118f0e37b52f8c Mon Sep 17 00:00:00 2001 From: atreyadbrx Date: Thu, 27 Aug 2026 20:31:34 +0000 Subject: [PATCH 2/3] template: render git-backed deployment block actively from apps init Replace the commented git_repository/git_source example with a conditional that the Databricks CLI's `apps init` fills in when scaffolding inside a Git repository (databricks/cli#6406). When the CLI detects an origin remote it renders a real git_repository (url + provider) and git_source (branch + repo-relative source_code_path); otherwise the template keeps source_code_path, so older CLIs and non-repo scaffolds are unaffected. Co-authored-by: Isaac Signed-off-by: atreyadbrx --- template/databricks.yml.tmpl | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/template/databricks.yml.tmpl b/template/databricks.yml.tmpl index bf1773d26..69c55ffaf 100644 --- a/template/databricks.yml.tmpl +++ b/template/databricks.yml.tmpl @@ -11,18 +11,23 @@ resources: app: name: "{{.projectName}}" description: "{{.appDescription}}" +{{- if .git.url}} + # Git-backed deployment: the app is deployed from the Git repository below + # (auto-detected from this directory's Git remote) instead of uploading + # local files. Commit and push the branch before deploying so the ref + # exists on the remote. + git_repository: + url: {{.git.url}} + provider: {{.git.provider}} + git_source: + branch: {{.git.branch}} + source_code_path: {{.git.sourceCodePath}} +{{- else}} + # Local source: files in this directory are uploaded on deploy. To deploy + # from Git instead, run `databricks apps init` inside a Git repository that + # has a remote — the git_repository/git_source block is filled in for you. source_code_path: ./ - - # Git-backed deployment (recommended): deploy from a Git repository/ref - # instead of uploading local files — reproducible, reviewable, and - # roll-back-able. Once the app is in a repo, replace `source_code_path` - # above with the block below (see the databricks-apps skill's git gate). - # git_repository: - # url: https://github.com/my-org/my-repo - # provider: gitHub # gitHub, gitHubEnterprise, gitLab, bitbucketCloud, ... - # git_source: - # branch: main # or tag: / commit: - # source_code_path: ./ # repo-relative path; omit for repo root +{{- end}} # Start the app automatically on deploy. lifecycle: From 62e06d7ce7b053e1272af4ab858d150feaa7e653 Mon Sep 17 00:00:00 2001 From: atreyadbrx Date: Tue, 1 Sep 2026 23:25:58 +0000 Subject: [PATCH 3/3] template: revert to commented git-backed example Git-backing is moving to an explicit opt-in migration for existing apps (driven by the databricks-apps skill) rather than detection at create time. Ship the git_repository/git_source block as a commented example that the migration fills in, instead of rendering it actively from apps init. Co-authored-by: Isaac Signed-off-by: atreyadbrx --- template/databricks.yml.tmpl | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/template/databricks.yml.tmpl b/template/databricks.yml.tmpl index 69c55ffaf..91d27a29f 100644 --- a/template/databricks.yml.tmpl +++ b/template/databricks.yml.tmpl @@ -11,23 +11,19 @@ resources: app: name: "{{.projectName}}" description: "{{.appDescription}}" -{{- if .git.url}} - # Git-backed deployment: the app is deployed from the Git repository below - # (auto-detected from this directory's Git remote) instead of uploading - # local files. Commit and push the branch before deploying so the ref - # exists on the remote. - git_repository: - url: {{.git.url}} - provider: {{.git.provider}} - git_source: - branch: {{.git.branch}} - source_code_path: {{.git.sourceCodePath}} -{{- else}} - # Local source: files in this directory are uploaded on deploy. To deploy - # from Git instead, run `databricks apps init` inside a Git repository that - # has a remote — the git_repository/git_source block is filled in for you. source_code_path: ./ -{{- end}} + + # Git-backed deployment: deploy from a Git repository/ref instead of + # uploading local files (reproducible, reviewable, rollback-able). To + # migrate this app to Git, replace `source_code_path` above with the block + # below and redeploy — the databricks-apps skill's git-migration path can + # do this for you. + # git_repository: + # url: https://github.com/my-org/my-repo + # provider: gitHub # gitHub, gitLab, bitbucketCloud, azureDevOpsServices, ... + # git_source: + # branch: main # or tag: / commit: + # source_code_path: ./ # repo-relative path # Start the app automatically on deploy. lifecycle: