vars set with `deploy` not used by `run`
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginne mit den Einstiegspunkten databricks bundle deploy und databricks bundle run sowie den im Fehler genannten Quellen für Variablenzuweisungen, einschließlich .databricks/bundle/<target>/variable-overrides.json. Stelle die zweistufige Befehlssequenz mit einer erforderlichen Variable nach und überprüfe, dass ein an deploy übergebener Wert für run verfügbar ist, ohne --var erneut anzugeben, während der Fehler für erforderliche Variablen erhalten bleibt, wenn kein Wert bereitgestellt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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"
- Vorherrschende Sprache
- Go
- Sterne
- 427
- Forks
- 267
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 233
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/cli
-
Apps commands only accept relative path to app.ymlEvtl. vergeben @yuri-rod hat das vor 38 Tagen übernommen. OffenCLI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
databricks/cli#6910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
databricks/cli#6670 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bump vulnerable dependencies workflow is failingEvtl. vergeben @shreyas-goenka hat das heute übernommen. Offenbump-vuln-deps-failure
databricks/cli#7531 · 1 Kommentar · 7 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATINGEvtl. vergeben @andrewnester hat das vor 1 Tag übernommen. OffenBug DABs
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
databricks/cli#7451 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bundle deploy of an AI/BI dashboard breaks viewers' private bookmarks (UI save + publish does not)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
databricks/cli#7419 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
prime-radiant-inc/evener#6241 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
coder/openstorage#807 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
NVIDIA/kubectl-nv#100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
TestNoEagerPackageRegexps red on main: internal/gui/feedback.go:19 compiles a package-level regexpOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag