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

Prefix secrets with DBT_ENV_SECRET_ for test env vars #995

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Apr 25, 2024

resolves dbt-labs/adapters-team-private#133

Problem

Environment variables containing secrets need to be prefixed with DBT_ENV_SECRET_ to be handled properly in dbt-core.

Solution

  • prefix testing environment variables with DBT_ENV_SECRET_
  • update the places where they get read in in /tests
  • update workflows that inject secrets
  • update tox.ini
  • update the oauth token refresh process

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Apr 25, 2024
@cla-bot cla-bot bot added the cla:yes label Apr 25, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-snowflake contributing guide.

@mikealfare mikealfare changed the title Prefix secrets with DBT_ENV_SECRET_ for proper handling in dbt-core Prefix secrets with DBT_ENV_SECRET_ for test env vars Apr 25, 2024
@mikealfare
Copy link
Contributor Author

A single instance of a test failed, it does not look like the secrets broke anything: https://github.com/dbt-labs/dbt-snowflake/actions/runs/8838621363/job/24270205847

@mikealfare
Copy link
Contributor Author

New CI run: https://github.com/dbt-labs/dbt-snowflake/actions/runs/8853470288

@mikealfare mikealfare merged commit 5a4f958 into main Apr 26, 2024
36 of 37 checks passed
@mikealfare mikealfare deleted the add-secrets-prefix-to-env-vars branch April 26, 2024 20:08
mikealfare added a commit that referenced this pull request May 1, 2024
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.

2 participants