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

File counts unstable for dbt projects with --exclude #414

Open
tconbeer opened this issue Apr 27, 2023 · 0 comments
Open

File counts unstable for dbt projects with --exclude #414

tconbeer opened this issue Apr 27, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@tconbeer
Copy link
Owner

Describe the bug
I can't reliably repro this, but sometimes running sqlfmt on a dbt project produces the different numbers of files in the output:

(dbt-Jui2apcR-py3.8) tco@bros-gold:~/dbt/proj$ sqlfmt .
79 files left unchanged.
(dbt-Jui2apcR-py3.8) tco@bros-gold:~/dbt/proj$ sqlfmt .
53 files left unchanged.

This doesn't actually seem like it has anything to do with the cache, as adding -k to either invocation doesn't change things. It might be related to git operations somehow?

To Reproduce
Not sure; create a dbt project, add a config file with the recommended excludes, and use sqlfmt a lot...

[tool.sqlfmt]
exclude=["target/**/*", "dbt_packages/**/*"]

Expected behavior
The same count of files every time.

Actual behavior
Randomly different counts, up to 2x the expected count of files.

Additional context
What is the output of sqlfmt --version? v0.18.0, been happening for a few versions, though.

@tconbeer tconbeer added the bug Something isn't working label Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant