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

add target-path to more cli commands that use it. #7647

Merged
merged 1 commit into from
May 16, 2023

Conversation

dwreeves
Copy link
Contributor

resolves #7646

Description

Related to my previous PR #7419 and issue #7418.

There are additional subcommands that do not have --target-path as an option, even though they create a target/ folder when one does not exist. Because we (at our company with our dbt setup) do not have our target set up in ${PWD}/target, and we specify the --target-path via the CLI, this ends up being an annoyance.

In particular, we were using dbt 1.1.x and ran into this as a regression for the command dbt run-operation. However, I went through the rest of the CLI and added --target-path for everything that met the following criteria:

  • ${PWD}/target/ does not exist.
  • I run dbt [subcommand].
  • After the command executes, ${PWD}/target/ does exist.

I also validated this against source code, e.g. GraphRunnableTask uses self.config.target_path, so all subclasses of this should have a --target-path.

Checklist

@dwreeves dwreeves requested review from a team as code owners May 16, 2023 19:34
@dwreeves dwreeves requested review from aranke and VersusFacit and removed request for a team May 16, 2023 19:34
@cla-bot cla-bot bot added the cla:yes label May 16, 2023
@stu-k stu-k merged commit 4f249b8 into dbt-labs:main May 16, 2023
@dbeatty10
Copy link
Contributor

@jtcohen6 would you approve backporting this one?

@jtcohen6
Copy link
Contributor

@dbeatty10 Good by me! Sorry I missed this comment last month

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] --target-path is needed in more CLI commands.
4 participants