-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Respect --project-dir in dbt clean command #2841
Respect --project-dir in dbt clean command #2841
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin. CLA has not been signed by users: @feluelle |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @feluelle! Could you add a changelog entry beneath v0.19.0 (either "under the hood" or a new "fixes" section), and add yourself to the list of contributors?
@@ -23,7 +24,8 @@ | |||
Contributors: | |||
- [@joelluijmes](https://github.com/joelluijmes) ([#2749](https://github.com/fishtown-analytics/dbt/pull/2749), [#2821](https://github.com/fishtown-analytics/dbt/pull/2821)) | |||
- [@kingfink](https://github.com/kingfink) ([#2791](https://github.com/fishtown-analytics/dbt/pull/2791)) | |||
- [@zmac12](https://github.com/zmac12) ([#2871](https://github.com/fishtown-analytics/dbt/pull/2817)) | |||
- [@zmac12](https://github.com/zmac12) ([#2817](https://github.com/fishtown-analytics/dbt/pull/2817)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtcohen6 There was a typo - 2871 instead of 2817.
Apart from the test I added, how can I manually check that the correct location will be cleaned. The thing is that it worked before for the current directory. So it didn't raise an error. I want to check that it removes the correct dirs and files. |
|
Yes. (I don't know what I meant by manually :D) I will add that. |
544bfbd
to
5af82c3
Compare
@jtcohen6 I added a test to ensure all directories specified in clean_targets were deleted by dbt clean. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks great! Thanks for the contribution @feluelle
resolves #2840
Description
To fix this issue I changed the code to move_to_nearest_project_dir before running the clean command. So it will clean the correct locations.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.