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-110] [Feature] Ability to modify which variables are checked when partial parsing #4642

Closed
1 task done
AntonAiven opened this issue Jan 28, 2022 · 7 comments
Closed
1 task done
Labels
enhancement New feature or request partial_parsing stale Issues that have gone stale

Comments

@AntonAiven
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

Partial parsing could be configured to not check if environment variables changes. We compile dbt in Github actions and we run it on a schedule in kubernetes. We change the authentication for dbt based on the environment, and do this through environment variables. This worked well in v0.21 because in that version dbt didin't check for changed environment variables, but since v1.0 it does, so now we need to compile each time we run.

Describe alternatives you've considered

No response

Who will this benefit?

Anyone who runs dbt in multiple environments

Are you interested in contributing this feature?

No response

Anything else?

No response

@AntonAiven AntonAiven added enhancement New feature or request triage labels Jan 28, 2022
@github-actions github-actions bot changed the title [Feature] Ability to modify which variables are checked when partial parsing [CT-110] [Feature] Ability to modify which variables are checked when partial parsing Jan 28, 2022
@gshank gshank self-assigned this Jan 31, 2022
@gshank
Copy link
Contributor

gshank commented Jan 31, 2022

Thanks for reporting this! I assume that you have env_vars in your profile? If that's the case, then the intention was that env_vars starting with DBT_ENV_SECRET would not be used for setting off partial parsing, but we inadvertently included them. We'll be fixing this bug in the next point release.

Please let me know if using secret env_vars (when working correctly) would not meet your needs.

@gshank
Copy link
Contributor

gshank commented Jan 31, 2022

The place that needs to be fixed is in core/dbt/context/secret.py, in the env_var method. Where it saved the return_value in self.env_vars, we want to skip saving if the env_var if it starts with the SECRET_ENV_PREFIX.

@gshank gshank removed the triage label Jan 31, 2022
@gshank gshank removed their assignment Jan 31, 2022
@jtcohen6
Copy link
Contributor

jtcohen6 commented Jan 31, 2022

Going to open two issues as follow-ons to this one:

@AntonAiven
Copy link
Author

The place that needs to be fixed is in core/dbt/context/secret.py, in the env_var method. Where it saved the return_value in self.env_vars, we want to skip saving if the env_var if it starts with the SECRET_ENV_PREFIX.

Thanks for reporting this! I assume that you have env_vars in your profile? If that's the case, then the intention was that env_vars starting with DBT_ENV_SECRET would not be used for setting off partial parsing, but we inadvertently included them. We'll be fixing this bug in the next point release.

Please let me know if using secret env_vars (when working correctly) would not meet your needs.

Something like this would definitely fix it for us!

@karunpoudel
Copy link
Contributor

I second this feature.

We have separate snowflake account for each environment. It would be nice if we could parse and build the image once, and run it in different environment without having to reparse. This would mean some sort of config options to ignore change in variables used in profiles.yml.

We are using dynamic secrets so the username and password can change between each dbt run. If variables with DBT_ENV_SECRET is ignored for partial parse then it should fix for us.

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the stale Issues that have gone stale label Aug 27, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2022

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers.

@github-actions github-actions bot closed this as completed Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request partial_parsing stale Issues that have gone stale
Projects
None yet
Development

No branches or pull requests

4 participants