Asset bundles sync don't follow .gitignore pattern syntax for root folders

Aperta
#3,456 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Riproduci il caso usando databricks.yml e .gitignore con l’albero mostrato, quindi esegui databricks bundle deploy su Databricks CLI v0.260.0. Traccia la gestione di include durante la sincronizzazione: confronta il comportamento della barra iniziale con le regole documentate per i pattern di .gitignore; il lavoro è completato quando viene caricata solo my_folder nella directory radice.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug DABs No Autoclose
Describe the issue

The sync: include: configuration of asset bundles don't respect leading slash / as .gitignore does:

From git docs (my highlight):

  • The slash "/" is used as the directory separator. Separators may occur at the beginning, middle or end of the .gitignore search pattern.
  • If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular .gitignore file itself. Otherwise the pattern may also match at any level below the .gitignore level.

I wanted to force an include a folder present in the root of my repo, but all folders named the same (inside other .gitignored folders) were included in the sync.

Configuration

File tree

.
├── ignored
│   └── my_folder
└── my_folder

databricks.yml

sync:
  include:
    - /my_folder/

.gitignore

/ignored
/my_folder

Result: both my_folder gets uploaded to Databricks workspace

Steps to reproduce the behavior
  1. Prepare files as above
  2. Run databricks bundle deploy
  3. See error
Expected Behavior

Only the my_folder in the root of the repo should be synced.

Actual Behavior

All folders named my_folder are synced.

OS and CLI version

Linux 6.6.87.2-microsoft-standard-WSL2
Databricks CLI v0.260.0

Is this a regression?

I haven't tested

Debug Logs

–

Lingua principale
Go
Stelle
427
Fork
267
Merge medio
2g 1h
PR unite (30g)
233

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/cli

Tutte le issue di databricks/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.