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

已關閉
#7,301 1 則留言 0 個 reaction 已指派 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 天 19 小時
30 天內合併 PR
218

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

databricks/cli 的其他 Issue

查看 databricks/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。