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

Tiny touchups for deps, clean #4366

Merged
merged 2 commits into from
Dec 2, 2021
Merged

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Nov 30, 2021

Resolved teensy bugs uncovered during the bug bash!

Avoid deprecation warning if irrelevant

This is a reasonable thing many users will do:

  • finding out that dbt_modules has been renamed to dbt_packages
  • adding dbt_packages to clean-targets (but leaving dbt_modules in there still)

Let's consider the deprecation warning "addressed" by that change, and stop raising it. Alternatively, if they do want to keep using dbt_modules and configure packages-install-path: "dbt_modules", we shouldn't raise the warning.

Use actual (bad) profile name

dbt clean + dbt deps are supposed to work even with an invalid database connection (profile). One easy way to test this is by running with, e.g., dbt clean --profile badprof.

@joellabes and I noticed that dbt uses the profile name specified in dbt_project.yml instead of the one specified in the CLI arg:

$ dbt clean --profile bad
18:22:44 | [ info  ] | Running with dbt=1.0.0-rc3
18:22:44 | [ info  ] | No profile "garage-postgres" found, continuing with no target

This PR would have us use Profile.pick_profile_name to find the right profile name for the log message. Voila:

$ dbt clean --profile bad
18:29:02 | [ info  ] | Running with dbt=1.0.0-rc2
18:29:03 | [ info  ] | No profile "bad" found, continuing with no target

@cla-bot cla-bot bot added the cla:yes label Nov 30, 2021
@jtcohen6 jtcohen6 changed the title Use actual (bad) profile name for ProfileNotFound event Tiny touchups for deps, clean Dec 1, 2021
@jtcohen6 jtcohen6 merged commit d973ae9 into main Dec 2, 2021
@jtcohen6 jtcohen6 deleted the fix/profile-name-when-bad-deps-clean branch December 2, 2021 11:12
jtcohen6 added a commit that referenced this pull request Dec 2, 2021
* Use actual profile name for log msg

* Raise clean dep warning iff configured path missing
jtcohen6 added a commit that referenced this pull request Dec 2, 2021
* Use actual profile name for log msg

* Raise clean dep warning iff configured path missing
iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
* Use actual profile name for log msg

* Raise clean dep warning iff configured path missing

automatic commit by git-black, original commits:
  d973ae9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants