bundle validate warns "Pattern ... does not match any files" for sync.include/exclude when the sync root is above the bundle root
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 78/100
Rechercherichtung
Start with bundle/config/validate/validate_sync_patterns.go and bundle/config/mutator/sync_infer_root.go to trace how the sync root and rewritten patterns are used. Add a regression test for sync.paths reaching above the bundle root, using the provided reproduction, and run the relevant validation tests. Done means the matching exclude no longer warns under --strict.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the issue
databricks bundle validate reports Pattern ... does not match any files for a sync.exclude (or sync.include) pattern that does match files, when sync.paths reaches above the bundle directory. With --strict the warning becomes an error, so validate exits 1 even though the exclusion works.
Steps to reproduce
shared/a.py
app/tests/x.py
app/databricks.yml
app/databricks.yml:
bundle:
name: repro
sync:
paths: [../shared, .]
exclude: [tests/**]
From app/: databricks bundle validate --strict -o json
Expected behavior
No warning. tests/** matches app/tests/x.py, and the resolved config already excludes it.
Actual behavior
Exit code 1 on v1.19.0:
Warning: Pattern app/tests/** does not match any files
at sync.exclude[0]
in databricks.yml:5:13
Error: 1 warning was found. Warnings are not allowed in strict mode
The resolved config (-o json) shows sync.exclude rewritten to ["app/tests/**"] and sync.paths to ["shared", "app"], so the sync itself uses the right pattern. Removing paths from the sync block makes the warning disappear.
Cause
From reading the source on main:
bundle/config/mutator/sync_infer_root.gosets the sync root to the common ancestor ofsync.pathsand rewrites eachsync.includeandsync.excludeentry relative to it (prefixing the bundle root's path from the sync root, hereapp/).bundle/config/validate/validate_sync_patterns.gothen globs each rewritten pattern withfileset.NewGlobSet(b.BundleRoot, ...), that is, against the bundle directory instead of the sync root.app/tests/**does not exist underapp/, so it warns.
Suggested fix: glob against the sync root in validate_sync_patterns.go, and add a test for a sync root above the bundle root.
OS and CLI version
Reproduced on Databricks CLI v1.19.0, macOS. Source reading only for main; I did not run later releases.
- Vorherrschende Sprache
- Go
- Sterne
- 409
- Forks
- 253
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 212
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 16 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 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle validate does not catch missing trigger.table_update.condition with multiple tablesEvtl. vergeben @yuri-rod hat das vor 2 Tagen übernommen. OffenDABs Enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
databricks/cli#7101 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs Enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7099 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
grafana/tempo-operator#1691 ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes backEvtl. vergeben @mge1512 hat das heute übernommen. Offenbug
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
mark3labs/kit#242 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
slavakurilyak/awesome-ai-agents#827 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
mpyw/declscope#262 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag