Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

immutable_folder cannot be used with a mode: development target

未关闭
#6,963 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
cli, devtools

调研方向

Start by tracing how experimental.immutable_folder is parsed and resolved, then inspect the development-mode uniqueness validation that rejects the snapshot file_path; the issue names no source files or tests. Reproduce with the supplied configuration using databricks bundle validate -t dev and -t prod. Done means the supported behavior is implemented and validation handles the dev and production targets as expected.

由索引模型根据 Issue 内容生成。

描述

Describe the issue

experimental.immutable_folder: true cannot be used in a bundle that has a target with mode: development.

  1. A mode: development target fails validation. The development-mode uniqueness check rejects the snapshot file_path.
  2. A target cannot set experimental, so the flag cannot be turned off for the development target only.
  3. The flag ignores a bundle variable. immutable_folder: ${var.immutable} stays off when the variable is true.

So a bundle with a development target and a shared production target cannot use the feature. Together with #6960, which blocks bundle validate when a top-level permissions block is present, the usual dev and prod bundle layout cannot adopt immutable_folder.

Configuration
bundle:
  name: immutable-dev-repro
  engine: direct

experimental:
  immutable_folder: true

resources:
  jobs:
    hello:
      name: hello
      tasks:
        - task_key: hello
          environment_key: default
          spark_python_task:
            python_file: ./src/hello.py
      environments:
        - environment_key: default
          spec:
            environment_version: "2"

targets:
  dev:
    mode: development
    default: true
  prod:
    mode: production
    workspace:
      root_path: /Workspace/Shared/immutable-dev-repro/prod
Steps to reproduce the behavior
  1. Run databricks bundle validate -t dev. Result:
    Error: file_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'
    
  2. Move the flag under the prod target (targets.prod.experimental.immutable_folder: true) and run databricks bundle validate -t prod. Result: Warning: unknown field: experimental. The flag has no effect.
  3. Set experimental.immutable_folder: ${var.immutable} with default: false, and set immutable: true in targets.prod.variables. Run databricks bundle validate -t prod -o json. Result: workspace.file_path is /Workspace/Shared/immutable-dev-repro/prod/files, not a snapshot path. The flag stays off.
Expected Behavior

One of these:

  • The development-mode check accepts the snapshot file_path, because each snapshot is already unique.
  • A target can set experimental.immutable_folder, so development can keep it off.
  • The flag resolves a bundle variable.
Actual Behavior

The development target fails validation, and there is no supported way to turn the flag on only for non-development targets.

OS and CLI version

Databricks CLI v1.18.0, macOS. The 1.19.0 release notes do not mention immutable_folder.

Is this a regression?

No. immutable_folder is new.

Debug Logs

The validation error in step 1 is the only output. I can attach --log-level=debug output on request.

主要语言
Go
星标
404
派生
246
平均合并
1 天 14 小时
30 天内合并 PR
281

环境准备

  • 提供 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 摘要。