Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Do not warn about no files to sync #1663

Open
svatopluk-sperka opened this issue Aug 8, 2024 · 3 comments · Fixed by #1694
Open

[Feature] Do not warn about no files to sync #1663

svatopluk-sperka opened this issue Aug 8, 2024 · 3 comments · Fixed by #1694
Labels
DABs DABs related issues Enhancement New feature or request

Comments

@svatopluk-sperka
Copy link

Hi Databricks,

we use DABs to deploy Scala-based project that only needs its JAR artifact to run. So we do not need any files to sync to Databricks workspace. However, when we exclude all files from sync via

sync:
  exclude:
    - "*"

we get Warning: There are no files to sync, please check your .gitignore and sync.exclude configuration when validating the bundle. This forces us to add some random file so that validation succeeds.

As I understand, it is a common need to sync some files. But it would be great if there was a way to tell the DABs that I really do not want to sync anything and it is intentional. What comes to mind is an ability to silence this warning so that sync does not become more complicated than it is.

Thank you for considering this!

@svatopluk-sperka svatopluk-sperka added the DABs DABs related issues label Aug 8, 2024
@andrewnester andrewnester added the Enhancement New feature or request label Aug 8, 2024
@pietern
Copy link
Contributor

pietern commented Aug 21, 2024

Thanks for raising this.

There is a somewhat related change in progress to enable specifying the paths to synchronize (as opposed to always defaulting to . relative to the bundle root directory). This field can also be set to nil or an empty sequence (example) and it will have the same outcome as what you're looking for.

@pietern pietern linked a pull request Aug 21, 2024 that will close this issue
@benedikt-mayer
Copy link

benedikt-mayer commented Aug 23, 2024

Happy to see the mentioned change to specifying paths, but:
We have the same use case as @svatopluk-sperka, but with these sync settings from your example:

sync:
  paths: []

I'm still getting the message (with Databricks CLI 0.227.0):
Warning: There are no files to sync, please check your .gitignore
We're deploying an artifact wheel, so this is a bit confusing for our developers.

@andrewnester andrewnester reopened this Aug 23, 2024
@andrewnester
Copy link
Contributor

Warning itself should be handled separately because using sync.paths is just a new one to instruct to not sync any path cc @pietern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DABs DABs related issues Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants