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

dbt clean does not respect the project-dir if provided #2840

Closed
1 of 5 tasks
feluelle opened this issue Oct 19, 2020 · 2 comments · Fixed by #2841
Closed
1 of 5 tasks

dbt clean does not respect the project-dir if provided #2840

feluelle opened this issue Oct 19, 2020 · 2 comments · Fixed by #2841
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@feluelle
Copy link
Contributor

Describe the bug

If I am not in the project directory and run dbt clean --project-dir <path>. DBT won't clean the directories starting from the project directory. It cleans it from the current directory.

Steps To Reproduce

go out of the project directory and pass the path to directory to the --project-dir flag.

dbt clean --project-dir <path>

Expected behavior

I expect dbt to clean the directories recursively defined in clean-targets of dbt_project.yml.

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:

installed version: 0.18.0
   latest version: 0.18.1

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:
  - bigquery: 0.18.0
  - snowflake: 0.18.0
  - redshift: 0.18.0
  - postgres: 0.18.0

The operating system you're using: macOS 10.15.6

The output of python --version: Python 3.7.2

@feluelle feluelle added bug Something isn't working triage labels Oct 19, 2020
@jtcohen6
Copy link
Contributor

Good find, @feluelle! I'm not sure if this has worked in the past, but I agree it's the intended (and expected) behavior.

I'm hopeful that this would be a straightforward fix, involving the addition of move_to_nearest_project_directory to the clean task. The contributor should also look to add a test here.

Is this something you'd be interested in contributing?

@jtcohen6 jtcohen6 added good_first_issue Straightforward + self-contained changes, good for new contributors! and removed triage labels Oct 19, 2020
@feluelle
Copy link
Contributor Author

Yes, I would love to work on that @jtcohen6 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants