databricks/cli issue: strict-mode warning when a group is set at target level and on a job
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
- 45/100
Piste de recherche
The debug log places the warning after the ApplyBundlePermissions mutator and before FixPermissions; start by reading those entry points and the permission validation described in the issue. Reproduce with the supplied configuration using databricks bundle validate -t dev-ci --strict. Done means maintainers clarify whether permissions can be layered and either stop warning for entries in different layers or make validation and documentation agree.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the issue
Declaring the same group in a target's permissions and again in a job's permissions inside that target produces a validation warning. In strict mode that warning is a hard error. The permissions docs describe this layered pattern as supported, with a defined order of precedence, and recommend defining permissions at the top level.
The docs also say a principal cannot appear in both the top-level permissions mapping and within resources. The two statements conflict, and the CLI behavior matches the second one.
Documentation conflict
The Set permissions for resources page (last updated Sep 11, 2026) makes statements that cannot all hold at once.
| Section | What the page says |
|---|---|
| Note near the top | Permissions cannot overlap: a user, group, or service principal cannot be defined in both the top-level permissions mapping and within resources. |
| All resources | Databricks recommends the top-level permissions mapping for managing bundle resource permissions. |
| Combined permissions | Permissions declared for a resource at the top level are combined with those declared for the same resource in a target. |
| Order of precedence | Lists four levels, from resource-in-target down to top-level. Its example sets test-group at the top level, on a job, and on that job in a target. |
The CLI schema doc strings in PR 5664 repeat the no-overlap rule: a principal cannot be set in both a resource's permissions and the top-level permissions mapping.
Workarounds and request
Current workarounds, each with a cost:
- Declare each principal in one place only. Either drop the group from the target-level
permissions, or drop it from the job and accept one level for the whole target. Dropping it from the target level only works if the group has no access to the deployment folder. Otherwise strict mode raises a second warning: "workspace folder has permissions not configured in bundle". - If the target-level levels suffice, use one of
CAN_VIEW,CAN_MANAGE, orCAN_RUNthere and remove the job-level entry. - Run validation without strict mode, which loses the gate for every other warning.
Request to maintainers:
- Confirm whether the same principal at target level and resource level is supported.
- If it is, stop emitting this warning for entries in a different layer.
- If it is not, correct the documentation: the recommended-approach text and the order-of-precedence example.
Configuration
The config below is sanitized from the real bundle. The same group is set to CAN_VIEW for the whole target and to CAN_MANAGE_RUN on one job in that target.
bundle:
name: my-bundle
variables:
developer_group:
default: my-developer-group
resources:
jobs:
my_job:
name: my_job
# tasks omitted
targets:
dev-ci:
mode: production
workspace:
host: https://<workspace>.cloud.databricks.com
root_path: /Workspace/<path>/.bundle/my-bundle/dev-ci
permissions:
- service_principal_name: <deployment-sp>
level: CAN_MANAGE
- group_name: ${var.developer_group}
level: CAN_VIEW
resources:
jobs:
my_job:
permissions:
- user_name: <user>@example.com
level: CAN_MANAGE
- group_name: ${var.developer_group}
level: CAN_MANAGE_RUN
Steps to reproduce the behavior
- Save the configuration above as
databricks.ymland fill in the placeholders. - Run
databricks bundle validate -t dev-ci --strict. - See the warning and the strict-mode error.
Expected Behavior
The permissions docs list an order of precedence for permissions defined in several places, from the resource in the target down to the bundle's top-level permissions. Under that order, a job-level entry in a target should override the target-level entry for the same group without a warning. The docs' own example combines a group at the top level, on a job, and on the same job in a target.
If layering the same principal is not supported, validation should say so clearly, and the docs should stop presenting it as the recommended path.
Actual Behavior
Validation reports one warning naming the group, then fails because strict mode forbids warnings. Output is sanitized except for the message wording and is from v1.20.0; v1.10.0 printed the last line as "Warnings are not allowed in strict mode". In the debug log the warning is printed right after the ApplyBundlePermissions mutator, before FixPermissions.
Warning: 'jobs' already has permissions set for '<developer-group>' group
Name: <bundle-name>
Target: dev-ci
Workspace:
Host: https://<workspace>.cloud.databricks.com
User: <service-principal-id>
Path: /Workspace/<path>/.bundle/<bundle-name>/dev-ci
Found 1 warning
Error: 1 warning was found. Warnings are treated as errors in strict mode
OS and CLI version
- Databricks CLI version:
Databricks CLI v1.20.0 (manually upgraded); also reproduced on v1.10.0 (Docker image) - Workspace: AWS
- Target mode:
production - Validation run in strict mode, which turns warnings into errors
- Run in the
ghcr.io/databricks/cli:latest Docker image on a self-hosted runner - OS:
Linux
Is this a regression?
Not known. The warning reproduces on v1.20.0 (installed manually) and on v1.10.0 (the current Docker image).
Debug Logs
Output of databricks bundle validate -t dev-ci --strict --log-level=debug, run on v1.20.0, with sensitive values redacted and unrelated lines omitted (full redacted log can be attached):
[... earlier lines omitted ...]
16:24:08 Debug: Apply pid=58 mutator=ProcessStaticResources mutator=DashboardFixups
16:24:08 Debug: Apply pid=58 mutator=ProcessStaticResources mutator=GenieSpaceFixups
16:24:08 Debug: Apply pid=58 mutator=ProcessStaticResources mutator=ApplyBundlePermissions
Warning: 'jobs' already has permissions set for '<developer-group>' group
16:24:08 Debug: Apply pid=58 mutator=ProcessStaticResources mutator=FixPermissions
16:24:08 Debug: Apply pid=58 mutator=PythonMutator(load_resources)
16:24:08 Debug: Apply pid=58 mutator=PythonMutator(apply_mutators)
[... lines omitted ...]
16:24:08 Debug: Apply pid=58 mutator=CheckPermissions
[... lines omitted ...]
16:24:08 Debug: Apply pid=58 mutator=ValidateSharedRootPermissions
[... lines omitted ...]
16:24:08 Debug: ApplyParallel pid=58 mutator=validate:folder_permissions
[... lines omitted ...]
16:24:08 Debug: Apply pid=58 mutator=ResolveJobRunFileTriggers
Name: <bundle-name>
Target: dev-ci
Workspace:
Host: https://<workspace>.cloud.databricks.com
User: <service-principal-id>
Path: /Workspace/<path>/.bundle/<bundle-name>/dev-ci
Found 1 warning
Error: 1 warning was found. Warnings are treated as errors in strict mode
16:24:08 Info: failed execution pid=58 exit_code=1 error="1 warning was found. Warnings are treated as errors in strict mode"
- Langage dominant
- Go
- Étoiles
- 405
- Forks
- 250
- Merge moyen
- 1 j 11 h
- PR mergées (30 j)
- 236
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 9 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 ·
Les mainteneurs répondent en général sous 1 jour
-
DABs engine/direct Enhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
databricks/cli#7013 · 2 réactions ·
Les mainteneurs répondent en général sous 1 jour
-
DABs
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 18/100
databricks/cli#7002 ·
Les mainteneurs répondent en général sous 1 jour
-
Bundle reports schema update for every deploymentPeut-être pris @yuri-rod l’a pris aujourd’hui. OuverteDABs
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
databricks/cli#6986 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de databricks/cli
Issues similaires
-
component/gpu-kubelet-plugin component/helm needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
kubernetes-sigs/dra-driver-nvidia-gpu#1559 ·
Les mainteneurs répondent en général sous 1 jour
-
TOTP enrollment returns 500 for phone-only users (empty TOTP account name)Peut-être pris @emiliosandoval4 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
Les mainteneurs répondent en général sous 1 jour
-
8.9 to 8.10 Helm upgrade guide still says deprecated keys are removed in chart v16 (Camunda 8.11)Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
camunda/camunda-platform-helm#7559 ·
Les mainteneurs répondent en général sous 1 jour
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substringPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertetriage/pending-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
external-secrets/external-secrets#7117 ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ENTERPILOT/GoModel#1183 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour