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

Ouverte
#7,306 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@andrewnester y travaille déjà.

Depuis le 3/11/2026.

  • #7329 par @andrewnester — ouverte

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
Go
Étoiles
424
Forks
261
Merge moyen
1 j 16 h
PR mergées (30 j)
224

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de databricks/cli

Toutes les issues de databricks/cli

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.