databricks / cli

Databricks CLI
Other
116 stars 40 forks source link

Bundle deploy sync whl takes .gitignore into account on Windows #1572

Open daanschonberger opened 4 days ago

daanschonberger commented 4 days ago

Describe the issue

When deploying the bundle the main databricks.yml consists of the following snippet

sync:
    include:
      <path-to-whl>

This path is also in our .gitignore When deploying the whl package doesn't get included in the deployment to the workspace, when removing the path from the .gitignore it deploys just fine.

Configuration

databricks.yml consists of:

sync:
    include:
      - "./dist/*.whl"

.gitignore file:

dist/

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Run databricks bundle deploy -t d
  2. Checking bundle path and omits dist folder with whl package

Expected Behavior

Expected to have the dist folder with a whl package even when in .gitignore

OS and CLI version

Since version 0.221 and above

Is this a regression?

Worked well before 0.221

Extra info: deployment via WSL/Linux works as expected Wildcarding the path without the dist folder also works like: *.whl

andrewnester commented 3 days ago

Hi! What if you try to specify the path is Windows-like format, - ".\\dist\\*.whl"? Does it work in this case?

daanschonberger commented 3 days ago

Hi Andrew, thanks for the swift reply. I did try that before, and it didn't work. Should have added it to the issue, my bad.

As said before, completely wildcarding the total path with * works fine so its a good workaround for now. It's not the highest prio. Just that documentation on the page is showing the desired way: Databricks_sync_issue