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

オープン
#3,456 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

示されているツリーで databricks.yml と .gitignore を使用してケースを再現し、その後 Databricks CLI v0.260.0 で databricks bundle deploy を実行します。同期時の include の処理を追跡し、先頭スラッシュの動作を .gitignore のパターンに関する文書化されたルールと比較します。完了条件は、ルートの my_folder のみがアップロードされることです。

索引モデルが issue の本文から書いたものです。

説明

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

–

主要言語
Go
スター
427
フォーク
267
平均マージ
2日 1時間
マージ済み PR(30日)
233

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/cli のほかの issue

databricks/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。