vars set with `deploy` not used by `run`
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Commencez par les points d’entrée databricks bundle deploy et databricks bundle run ainsi que par les sources d’affectation des variables mentionnées dans l’erreur, notamment .databricks/bundle/<target>/variable-overrides.json. Reproduisez la séquence de commandes en deux étapes avec une variable obligatoire et vérifiez qu’une valeur transmise à deploy est disponible pour run sans répéter --var, tout en conservant l’erreur de variable obligatoire lorsqu’aucune valeur n’est fournie.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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"
- Langage dominant
- Go
- Étoiles
- 427
- Forks
- 267
- Merge moyen
- 2 j 1 h
- PR mergées (30 j)
- 233
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
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de databricks/cli
-
Apps commands only accept relative path to app.ymlPeut-être pris @yuri-rod l’a pris il y a 38 jours. OuverteCLI
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
databricks/cli#6910 ·
Les mainteneurs répondent en général sous 1 jour
-
DABs
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
databricks/cli#6670 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Bump vulnerable dependencies workflow is failingPeut-être pris @shreyas-goenka l’a pris aujourd’hui. Ouvertebump-vuln-deps-failure
databricks/cli#7531 · 1 commentaire · 7 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATINGPeut-être pris @andrewnester l’a pris il y a 1 jour. OuverteBug DABs
Difficulté 3/5 1-2 jours Accessibilité débutants 76/100
databricks/cli#7451 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Bundle deploy of an AI/BI dashboard breaks viewers' private bookmarks (UI save + publish does not)Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
databricks/cli#7419 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de databricks/cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
prime-radiant-inc/evener#6241 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
coder/openstorage#807 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
NVIDIA/kubectl-nv#100 ·
Les mainteneurs répondent en général sous 1 jour
-
TestNoEagerPackageRegexps red on main: internal/gui/feedback.go:19 compiles a package-level regexpOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour