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

Abierto
#7,306 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@andrewnester ya está trabajando en esto.

Desde el 3/11/2026.

  • #7329 de @andrewnester — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Go
Estrellas
424
Forks
261
Merge medio
1 d 16 h
PR fusionados (30 d)
224

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de databricks/cli

Todos los issues de databricks/cli

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.