Direct engine: bundle deployment bind fails when experimental.immutable_folder is true

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

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

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

2026年11月3日 から。

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

評価

この issue はまだ評価されていません。

説明

Bug DABs
Describe the issue

bundle deployment bind fails on the direct engine when experimental.immutable_folder: true is set. Bind calculates a plan on a configuration that does not hold resources.internal_immutable_snapshots.immutable. So every resource that references ${workspace.file_path} cannot resolve, and the plan fails. This blocks moving an existing resource into a bundle with bind.

Configuration
bundle:
  name: example-bundle
  engine: direct

experimental:
  immutable_folder: true

resources:
  jobs:
    example_job:
      name: example-job
      tasks:
        - task_key: main
          environment_key: default
          spark_python_task:
            python_file: ./main.py
            parameters:
              - --input
              - ${workspace.file_path}/input.json
      environments:
        - environment_key: default
          spec:
            environment_version: "5"
  schemas:
    example_schema:
      catalog_name: main
      name: example_schema
Steps to reproduce the behavior
  1. Create a job and a schema in the workspace, outside the bundle.
  2. Use a target that has never deployed, so the deployment state is empty.
  3. Run databricks bundle deployment bind example_job <job id> --auto-approve.
  4. Run databricks bundle deploy --select jobs.example_job. This writes the snapshot resource into the state. Then run step 3 again.
Expected Behavior

Bind writes the job ID into the state. The next bundle plan shows the job as update, with its paths in the snapshot folder.

Actual Behavior

Step 3 fails for every resource key, a schema key included:

Error: invalid dependency "${resources.internal_immutable_snapshots.immutable.full_path}", no such node "resources.internal_immutable_snapshots.immutable"

After step 4, bind plans the snapshot as delete and fails:

Error: cannot plan resources.jobs.example_job: cannot resolve "${resources.internal_immutable_snapshots.immutable.full_path}": internal error: resources.internal_immutable_snapshots.immutable: action is "delete" missing new_state
Error: planning failed

Workaround: set immutable_folder: false for the bind only, then set it back to true. The next plan shows skip for a bound schema and update for a bound job, with snapshot paths.

A variable reference in experimental.immutable_folder is not a workaround. With ${var.immutable_folder}, the string parameter ${workspace.file_path}/input.json keeps the plain files/ path, but python_file moves to the snapshot path.

OS and CLI version

macOS, Databricks CLI v1.21.0. The bind flow in bundle/direct/bind.go is the same at v1.22.1, and v1.23.0 does not change that file.

Is this a regression?

Unknown.

Detailed plan

Not attached. Bind fails before it prints a plan.

Debug Logs

Not attached.

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

環境構築

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

はじめの一歩

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

databricks/cli のほかの issue

databricks/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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