`bundle plan` always plans an App update for `config.env` values, because the Apps API does not return them

オープン
#7,301 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@andrewnester がすでに取り組んでいます。

2026年11月3日 から。

  • #7326 @andrewnester による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

Reproduce with the small bundle in the issue: run databricks bundle deploy -t dev, then databricks bundle plan -t dev -o json, and compare changes for resources.apps.repro against remote_state.config.env. The payload does not name the Go source files involved, so locate the Apps diff logic from there. Done when a plan with unchanged config.env values (plain value and value_from) reports skip, and a real env change still plans an update.

索引モデルが issue の本文から書いたものです。

説明

Bug DABs
Describe the issue

For an App with config.env entries, databricks bundle plan plans an update of every config.env[N].value and config.env[N].value_from on every run, with identical old and new values, even immediately after a successful deploy with nothing changed. The live App returned by the Apps API lists each env entry with its name only, so the comparison against the remote state never matches.

Consequences:

  • A bundle containing such an App can never plan clean, so CI checks that gate on "no changes" (or drift detection) always flag it.
  • Every bundle deploy of the plan redeploys and restarts the App, even when nothing changed.
Configuration
bundle:
  name: env-diff-repro

targets:
  dev:
    mode: production
    default: true

resources:
  apps:
    repro:
      name: env-diff-repro
      source_code_path: ./app
      config:
        command: [python, app.py]
        env:
          - name: GREETING
            value: hello

app/app.py is any App that starts, for example a stdlib http.server listening on DATABRICKS_APP_PORT. The same happens with value_from bound to an App resource (we saw it with a postgres resource).

Steps to reproduce
  1. databricks bundle deploy -t dev
  2. databricks bundle plan -t dev -o json, with nothing changed.
Expected behavior

resources.apps.repro plans skip.

Actual behavior
"resources.apps.repro": {
  "action": "update",
  "changes": {
    "config.env[0].value": {"action": "update", "old": "hello", "new": "hello"}
  }
}

and remote_state.config.env is [{"name": "GREETING"}]. Removing env makes the plan clean (skip). Deploying the plan redeploys the App each time.

OS and CLI version
  • Databricks CLI v1.21.0 and v1.23.0 (both reproduce)
  • macOS (arm64); bundle plan -o json writes plan_version 2
Is this a regression?

Unknown.

Debug Logs

Can attach on request.

主要言語
Go
スター
424
フォーク
261
平均マージ
1日 16時間
マージ済み PR(30日)
224

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/cli のほかの issue

databricks/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。