bundle validate does not catch missing trigger.table_update.condition with multiple tables
维护者通常 1 天内回复
评估
调研方向
Start at the bundle validation path for job trigger configuration and inspect how table_update.table_names and condition are validated; the issue does not name specific files or tests. Reproduce with the YAML configuration in the issue, then run the relevant bundle validation tests. Done when validation reports that multiple table names require ANY_UPDATED or ALL_UPDATED, while a single table remains valid without a condition.
由索引模型根据 Issue 内容生成。
描述
Describe the issue
databricks bundle validate accepts a job whose trigger.table_update lists more than one table but sets no condition. The Jobs API then rejects that job during databricks bundle deploy, after the files have already been uploaded:
Endpoint: POST https://<workspace>/api/2.2/jobs/create
HTTP Status: 400 Bad Request
API error_code: INVALID_PARAMETER_VALUE
API message: Invalid condition: it must be one of ANY_UPDATED, ALL_UPDATED when more than one table is defined
Error: cannot create resources.jobs.my_job.permissions: dependency failed: resources.jobs.my_job
condition is optional when there is one table and required when there are two or more. validate should report that, since it can be checked without calling the API.
Configuration
resources:
jobs:
my_job:
name: my_job
trigger:
pause_status: UNPAUSED
table_update:
# condition: ANY_UPDATED <- deploy only succeeds with this line
table_names:
- main.default.table_a
- main.default.table_b
wait_after_last_change_seconds: 60
tasks:
- task_key: t
notebook_task:
notebook_path: /Workspace/Shared/some_notebook
Steps to reproduce the behavior
- Add the job above to a bundle.
- Run
databricks bundle validate. It reportsValidation OK!. - Run
databricks bundle deploy. Job creation fails with the 400 above.
Expected Behavior
databricks bundle validate fails (or at least warns) that trigger.table_update.condition must be ANY_UPDATED or ALL_UPDATED when table_names has more than one entry.
Actual Behavior
Validation passes, and the problem only shows up during deploy, as an API error after files are uploaded.
OS and CLI version
- Databricks CLI v1.20.0
- Linux (WSL2)
- Azure Databricks workspace
Is this a regression?
Not known.
- 主要语言
- Go
- 星标
- 409
- 派生
- 253
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 212
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
databricks/cli 的其他 Issue
-
Apps commands only accept relative path to app.yml可能已有人在做 @yuri-rod 于 17 天前认领。 未关闭CLI
难度 2/5 1-3 小时 新手友好度 82/100
databricks/cli#6910 ·
维护者通常 1 天内回复
-
DABs
难度 2/5 1-3 小时 新手友好度 68/100
databricks/cli#6670 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
databricks/cli#7100 ·
维护者通常 1 天内回复
-
DABs Enhancement
难度 5/5 一周以上 新手友好度 35/100
databricks/cli#7099 ·
维护者通常 1 天内回复
-
DABs
难度 4/5 3-5 天 新手友好度 45/100
databricks/cli#7032 ·
维护者通常 1 天内回复
相似的 Issue
-
native
难度 2/5 1-3 小时 新手友好度 72/100
prime-radiant-inc/evener#4839 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
521xueweihan/HelloGitHub#4073 ·
-
难度 2/5 1-3 小时 新手友好度 66/100
goharbor/terraform-provider-harbor#655 · 1 条评论 ·
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 85/100
syncthing/syncthing#10935 · 1 条评论 ·
维护者通常 1 天内回复