-
Notifications
You must be signed in to change notification settings - Fork 151
Description
Describe the issue
The ** glob pattern in bundle.include and sync.exclude does not match more than one directory level. This contradicts standard gitignore/glob semantics where ** should match zero or more directories.
Configuration
bundle:
name: example-project
include:
- databricks/**/*.yml
- "!databricks//_archive/"
sync:
paths:
- databricks
exclude:
- "example-project/**"
File structure:
- databricks.yml
- databricks/ example-project/ resources/ example_project_pipeline.yml # defines pipeline resource lakebase.yml src/ bronze_telemetry.py ...
- example-project/ # root-level, unrelated directory
Steps to reproduce the behavior
- Place a resource YAML at databricks/example-project/resources/example_project_pipeline.yml
- Set include: ["databricks/**/*.yml"] in databricks.yml
- Run databricks bundle validate -t dev
- Observe Resources: is empty — the pipeline is not found
Expected Behavior
- databricks/**/*.yml should match databricks/example-project/resources/example_project_pipeline.yml (2 levels deep under databricks/)
- sync.exclude: "example-project/**" should only exclude root-level example-project/, not databricks/example-project/
Actual Behavior
- databricks/**/.yml only matches 1 directory level (e.g., databricks/example-project/.yml) — fails at 2+ levels
- sync.exclude: "example-project/" also matches nested databricks/example-project/, removing files that should be synced
- Anchoring with /example-project/** does not fix the sync.exclude behavior
Workarounds found:
- include: ["databricks/**/resources/*.yml"] — works because ** only needs to traverse one level
- sync.paths: [databricks] instead of sync.exclude — avoids the glob issue entirely
OS and CLI version
Databricks CLI v0.294.0 - Mac OS
Is this a regression?
Unknown — this is the first encounter with multi-level ** glob patterns in this project.
Detailed plan
N/a — bundle validate completes with zero resources found, so no plan is generated.
Debug Logs
$ databricks bundle validate -t dev --log-level=debug
22:50:50 Info: start pid=8543 version=0.294.0 args="databricks, bundle, validate, -t, dev, --log-level=debug"
22:50:50 Debug: Found bundle root at /Users/databricksuser/git/databricks/demo (file /Users/databricksuser/git/databricks/demo/databricks.yml) pid=8543
22:50:50 Info: Phase: load pid=8543
22:50:50 Debug: Apply pid=8543 mutator=EntryPoint
22:50:50 Debug: Apply pid=8543 mutator=scripts.preinit
22:50:50 Debug: No script defined for preinit, skipping pid=8543 mutator=scripts.preinit
22:50:50 Debug: Apply pid=8543 mutator=ProcessRootIncludes
22:50:50 Debug: Apply pid=8543 mutator=VerifyCliVersion
22:50:50 Debug: Apply pid=8543 mutator=EnvironmentsToTargets
22:50:50 Debug: Apply pid=8543 mutator=ComputeIdToClusterId
22:50:50 Debug: Apply pid=8543 mutator=InitializeVariables
22:50:50 Debug: Apply pid=8543 mutator=DefineDefaultTarget(default)
22:50:50 Debug: Apply pid=8543 mutator=validate:unique_resource_keys
22:50:50 Debug: Apply pid=8543 mutator=SelectTarget(dev)
22:50:50 Debug: Loading lakebase-salesdemo profile from /Users/databricksuser/.databrickscfg pid=8543 sdk=true
22:50:50 Debug: Running command: az account show --output json pid=8543 sdk=true
22:50:51 Debug: Running command: az account get-access-token --resource xxxxxxxxx --output json --tenant xxxxxxx pid=8543 sdk=true
22:50:51 Info: Refreshed OAuth token for zzzzzzzzzzzzzzz for tenant xxxxxxxxxxx from Azure CLI, which expires on 2026-03-24 23:03:23.000000 pid=8543 sdk=true
22:50:51 Debug: Running command: az account show --output json pid=8543 sdk=true
22:50:51 Debug: Running command: az account get-access-token --resource https://management.core.windows.net/ --output json --tenant xxxxxxxxxxx pid=8543 sdk=true
22:50:51 Info: Refreshed OAuth token for https://management.core.windows.net/ for tenant xxxxxxxxxxx from Azure CLI, which expires on 2026-03-24 23:06:50.000000 pid=8543 sdk=true
22:50:51 Info: Using Azure CLI authentication with AAD tokens pid=8543 sdk=true
22:50:51 Debug: Apply pid=8543 mutator=
22:50:51 Info: Phase: initialize pid=8543
22:50:51 Debug: Apply pid=8543 mutator=validate:AllResourcesHaveValues
22:50:51 Debug: Apply pid=8543 mutator=validate:interpolation_in_auth_config
22:50:51 Debug: Apply pid=8543 mutator=validate:no_interpolation_in_bundle_name
22:50:51 Debug: Apply pid=8543 mutator=validate:scripts
22:50:51 Debug: Apply pid=8543 mutator=RewriteSyncPaths
22:50:51 Debug: Apply pid=8543 mutator=SyncDefaultPath
22:50:51 Debug: Apply pid=8543 mutator=SyncInferRoot
22:50:51 Debug: Apply pid=8543 mutator=InitializeCache
22:50:51 Debug: Apply pid=8543 mutator=PopulateCurrentUser
22:50:51 Debug: [Local Cache] using cache key: 45fcc7f9e9e6dd26db9c0702efafd4f890ab7479aa35caedfb642d984fea068c pid=8543 mutator=PopulateCurrentUser
22:50:51 Debug: [Local Cache] cache hit pid=8543 mutator=PopulateCurrentUser
22:50:51 Debug: Apply pid=8543 mutator=LoadGitDetails
22:50:51 Debug: Apply pid=8543 mutator=ApplySourceLinkedDeploymentPreset
22:50:51 Debug: Apply pid=8543 mutator=DefineDefaultWorkspaceRoot
22:50:51 Debug: Apply pid=8543 mutator=ExpandWorkspaceRoot
22:50:51 Debug: Apply pid=8543 mutator=DefaultWorkspacePaths
22:50:51 Debug: Apply pid=8543 mutator=PrependWorkspacePrefix
22:50:51 Debug: Apply pid=8543 mutator=RewriteWorkspacePrefix
22:50:51 Debug: Apply pid=8543 mutator=SetVariables
22:50:51 Debug: Apply pid=8543 mutator=ResolveVariableReferences
22:50:51 Debug: Apply pid=8543 mutator=ResolveLookupVariables
22:50:51 Debug: Apply pid=8543 mutator=ResolveVariableReferences
22:50:51 Debug: Apply pid=8543 mutator=validate:volume-path
22:50:51 Debug: Apply pid=8543 mutator=ApplyTargetMode
22:50:51 Info: Development mode: disabling deployment lock since bundle.deployment.lock.enabled is not set to true pid=8543 mutator=ApplyTargetMode
22:50:51 Debug: Apply pid=8543 mutator=ConfigureWSFS
22:50:51 Debug: Apply pid=8543 mutator=ProcessStaticResources
22:50:51 Debug: Apply pid=8543 mutator=ProcessStaticResources mutator=ResolveVariableReferences(resources)
22:50:51 Debug: Apply pid=8543 mutator=ProcessStaticResources mutator=LogResourceReferences
22:50:51 Debug: Apply pid=8543 mutator=ProcessStaticResources mutator=NormalizePaths
22:50:51 Debug: Apply pid=8543 mutator=ProcessStaticResources mutator=TranslatePathsDashboards
22:50:51 Debug: Apply pid=8543 mutator=PythonMutator(load_resources)
22:50:51 Debug: Apply pid=8543 mutator=PythonMutator(apply_mutators)
22:50:51 Debug: Apply pid=8543 mutator=validate:required
22:50:51 Debug: Apply pid=8543 mutator=validate:enum
22:50:51 Debug: Apply pid=8543 mutator=validate:validate_dashboard_etags
22:50:51 Debug: Apply pid=8543 mutator=CheckPermissions
22:50:51 Debug: Apply pid=8543 mutator=TranslatePaths
22:50:51 Debug: Apply pid=8543 mutator=PythonWrapperWarning
22:50:51 Debug: Apply pid=8543 mutator=ApplyArtifactsDynamicVersion
22:50:51 Debug: Apply pid=8543 mutator=artifacts.Prepare
22:50:51 Info: No local tasks in databricks.yml config, skipping auto detect pid=8543 mutator=artifacts.Prepare
22:50:51 Debug: Apply pid=8543 mutator=apps.Validate
22:50:51 Debug: Apply pid=8543 mutator=ValidateTargetMode
22:50:51 Debug: Apply pid=8543 mutator=ValidateSharedRootPermissions
22:50:51 Debug: Apply pid=8543 mutator=metadata.AnnotateJobs
22:50:51 Debug: Apply pid=8543 mutator=metadata.AnnotatePipelines
22:50:51 Debug: Apply pid=8543 mutator=scripts.postinit
22:50:51 Debug: No script defined for postinit, skipping pid=8543 mutator=scripts.postinit
22:50:51 Debug: ApplyParallel pid=8543 mutator=fast_validate(readonly)
22:50:51 Debug: ApplyParallel pid=8543 mutator=validate:files_to_sync
22:50:51 Debug: ApplyParallel pid=8543 mutator=validate:folder_permissions
22:50:51 Debug: ApplyParallel pid=8543 mutator=validate:validate_sync_patterns
22:50:51 Debug: ApplyParallel pid=8543 mutator=fast_validate(readonly) mutator=validate:job_cluster_key_defined
22:50:51 Debug: ApplyParallel pid=8543 mutator=fast_validate(readonly) mutator=validate:job_task_cluster_spec
22:50:51 Debug: ApplyParallel pid=8543 mutator=fast_validate(readonly) mutator=validate:artifact_paths
22:50:52 Debug: GET /api/2.0/workspace/get-status?path=/Workspace/Users/databricks.user@company.com/.bundle/example-project/dev/files
< HTTP/2.0 200 OK
< {
< "object_id": 2331306341819824,
< "object_type": "DIRECTORY",
< "path": "/Workspace/Users/databricks.user@company.com/.bundle/example-project/dev/files",
< "resource_id": "2331306341819824"
< } pid=8543 mutator=validate:files_to_sync sdk=true
22:50:52 Debug: Path /Workspace/Users/databricks.user@company.com/.bundle/example-project/dev/files has type directory (ID: 2331306341819824) pid=8543 mutator=validate:files_to_sync
Name: example-project
Target: dev
Workspace:
Host: https://adb-xxxxxxxxx.y.azuredatabricks.net
User: databricks.user@company.com
Path: /Workspace/Users/databricks.user@company.com/.bundle/example-project/dev
Validation OK!
22:50:52 Info: completed execution pid=8543 exit_code=0
22:50:52 Debug: no telemetry logs to upload pid=8543