vars set with `deploy` not used by `run`
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 databricks bundle deploy 和 databricks bundle run 進入點,以及錯誤中列出的變數指派來源開始,包括 .databricks/bundle/<target>/variable-overrides.json。使用必要變數重現兩步驟命令序列,並驗證傳遞給 deploy 的值無需重複指定 --var 即可供 run 使用,同時在未提供任何值時保留必要變數錯誤。
由索引模型根據 Issue 內容生成。
描述
Describe the issue
This may not be a bug but I couldn't find supporting documentation on this behavior.
When variables that do not have a default value are set with --var at deploy time, they do not carry over to run. Instead the below error is returned
Error: no value assigned to required variable <variable> ...
The variable does indeed get set in the job so I'd expect run to know the value was already set.
Configuration
Create a job that uses the below variable
databricks.yml:
bundle:
name: dash_2
include:
- ./resources/*.yaml
variables:
my_variable:
description: no default value
targets:
prod:
mode: production
workspace:
host: <your host>
root_path: /Workspace/Users/${workspace.current_user.userName}/.bundle/${bundle.name}/${bundle.target}
Steps to reproduce the behavior
- run
databricks bundle deploy -t prod --var="my_variable=new_value" - Run
databricks bundle run -t prod <job_name> - See error
Expected Behavior
If a non-default var is set at deploy time then run will know that and pass without the var set there as well. It should act as you triggered the job from the UI.
Actual Behavior
run does not know the vars set at deploy time.
OS and CLI version
macos and ubuntu
cli v0.239.1
Is this a regression?
No
Debug Logs
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=EntryPoint
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=scripts.preinit
11:10:33 DEBUG No script defined for preinit, skipping pid=80996 mutator=load mutator=seq mutator=scripts.preinit
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ProcessRootIncludes
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq mutator=ProcessInclude(resources/dash_1_scoping.yaml)
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq mutator=ProcessInclude(resources/pt__monthly_update.yaml)
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ProcessRootIncludes mutator=seq mutator=ProcessInclude(resources/pt__new_cohort.yaml)
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=VerifyCliVersion
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=EnvironmentsToTargets
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=ComputeIdToClusterId
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=InitializeVariables
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=DefineDefaultTarget(default)
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=PythonMutator(load)
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=validate:unique_resource_keys
11:10:33 DEBUG Apply pid=80996 mutator=load mutator=seq mutator=SelectTarget(dev)
11:10:33 DEBUG Loading profile dev because of host match pid=80996
11:10:33 DEBUG Apply pid=80996 mutator=<func>
11:10:33 DEBUG Apply pid=80996 mutator=initialize
11:10:33 INFO Phase: initialize pid=80996 mutator=initialize
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=validate:AllResourcesHaveValues
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=RewriteSyncPaths
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=SyncDefaultPath
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=SyncInferRoot
11:10:33 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=PopulateCurrentUser
11:10:34 DEBUG GET /api/2.0/preview/scim/v2/Me
< HTTP/2.0 200 OK
< {
< "active": true,
< "emails": [
< {
< "primary": true,
< "type": "work",
< }
< ],
< "groups": [
< {
< },
< {
< },
< {
< }
< ],
< "id": "8793528040177278",
< "name": {
< },
< "roles": [
< {
< ],
< "schemas": [
< "urn:ietf:params:scim:schemas:core:2.0:User",
< "... (1 additional elements)"
< ],
< } pid=80996 mutator=initialize mutator=seq mutator=PopulateCurrentUser sdk=true
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=LoadGitDetails
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=ApplySourceLinkedDeploymentPreset
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=DefineDefaultWorkspaceRoot
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=ExpandWorkspaceRoot
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=DefaultWorkspacePaths
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=PrependWorkspacePrefix
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=RewriteWorkspacePrefix
11:10:34 DEBUG Apply pid=80996 mutator=initialize mutator=seq mutator=SetVariables
11:10:34 ERROR Error: no value assigned to required variable DBT_PROJECT_SCHEMA. Assignment can be done using "--var", by setting the BUNDLE_VAR_DBT_PROJECT_SCHEMA environment variable, or in .databricks/bundle/<target>/variable-overrides.json file pid=80996 mutator=initialize mutator=seq mutator=SetVariables
11:10:34 ERROR Error: no value assigned to required variable DBT_PROJECT_SCHEMA. Assignment can be done using "--var", by setting the BUNDLE_VAR_DBT_PROJECT_SCHEMA environment variable, or in .databricks/bundle/<target>/variable-overrides.json file pid=80996 mutator=initialize mutator=seq
11:10:34 ERROR Error: no value assigned to required variable DBT_PROJECT_SCHEMA. Assignment can be done using "--var", by setting the BUNDLE_VAR_DBT_PROJECT_SCHEMA environment variable, or in .databricks/bundle/<target>/variable-overrides.json file pid=80996 mutator=initialize
Error: no value assigned to required variable DBT_PROJECT_SCHEMA. Assignment can be done using "--var", by setting the BUNDLE_VAR_DBT_PROJECT_SCHEMA environment variable, or in .databricks/bundle/<target>/variable-overrides.json file
11:10:34 ERROR failed execution pid=80996 exit_code=1 error="no value assigned to required variable DBT_PROJECT_SCHEMA. Assignment can be done using \"--var\", by setting the BUNDLE_VAR_DBT_PROJECT_SCHEMA environment variable, or in .databricks/bundle/<target>/variable-overrides.json file"
- 主要語言
- Go
- 星號
- 427
- 分支
- 267
- 平均合併
- 2 天 1 小時
- 30 天內合併 PR
- 233
環境準備
- 提供 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 於 38 天前認領。 未關閉CLI
難度 2/5 1-3 小時 新手友好度 82/100
databricks/cli#6910 ·
維護者通常 1 天內回覆
-
DABs
難度 2/5 1-3 小時 新手友好度 68/100
databricks/cli#6670 · 1 個 reaction ·
維護者通常 1 天內回覆
-
Bump vulnerable dependencies workflow is failing可能已有人在做 @shreyas-goenka 今天認領。 未關閉bump-vuln-deps-failure
databricks/cli#7531 · 1 則留言 · 已指派 7 人 ·
維護者通常 1 天內回覆
-
bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATING可能已有人在做 @andrewnester 於 1 天前認領。 未關閉Bug DABs
難度 3/5 1-2 天 新手友好度 76/100
databricks/cli#7451 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Bundle deploy of an AI/BI dashboard breaks viewers' private bookmarks (UI save + publish does not)未關閉
難度 4/5 3-5 天 新手友好度 45/100
databricks/cli#7419 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 66/100
kubernetes-sigs/aws-iam-authenticator#1125 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
prime-radiant-inc/evener#6241 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
snowflakedb/gosnowflake#1864 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
mandiant/VM-Packages#1667 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
coder/openstorage#807 ·
維護者通常 1 天內回覆