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

[CT-2282] Determine how to favor attributes from dbt_project.yml over those form CLI flags or env vars #7140

Closed
stu-k opened this issue Mar 8, 2023 · 2 comments
Labels

Comments

@stu-k
Copy link
Contributor

stu-k commented Mar 8, 2023

Details

After looking at #6882, the execution team determined that we probably removed the capability of using fields set in dbt_project.yml in our Flags object that we pass around. The way to reintroduce this capability is unclear, so a spike seems appropriate.

Questions

  • How did dbt combine fields from both dbt_project.yml and the dbt.flags module before the feature/click-cli branch was merged?
  • Is there a way within our current system to respect fields from both dbt_project.yml and those passed in via flags/env vars before initialization of things that require Flags?
@github-actions github-actions bot changed the title Determine how to favor attributes from dbt_project.yml over those form CLI flags or env vars [CT-2282] Determine how to favor attributes from dbt_project.yml over those form CLI flags or env vars Mar 8, 2023
@gshank
Copy link
Contributor

gshank commented Mar 8, 2023

The flags module didn't look at dbt_project.yml at all when instantiating flags, just fyi. When those fields were set in the Project they did: target_path: str = flag_or(flags.TARGET_PATH, cfg.target_path, "target"). So the flags version took precedence over the dbt_project.yml setting.

@jtcohen6
Copy link
Contributor

Closing as this is already working (with back compat) in the main branch. All we need in v1.5 is a deprecation warning. We plan to remove this back compat in a future version of dbt-core.

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

No branches or pull requests

3 participants