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 metadata env method to provider context #5794

Conversation

jared-rimmer
Copy link
Contributor

@jared-rimmer jared-rimmer commented Sep 9, 2022

resolves #5522

Description

  • Added the method dbt_metadata_envs which is a wrapper for the get_metadata_env method which is imported from dbt.contracts as it already contained the required functionality.
  • Also includes small refactoring of the tests to add two helper functions for parsing json logs and find the result needed in the parsed logs. This was repeated in another test so decided to split it out to avoid repetition.

Open Question

  • The requirements on the initial issue mention the DBT_CLOUD variables which are detailed here. Are you happy for me to extend the dbt_metadata_envs method to search for the prefix DBT_CLOUD_ as well?

Checklist

@jared-rimmer jared-rimmer changed the title Feat/add metadata env method to provider context Add metadata env method to provider context Sep 9, 2022
@gshank
Copy link
Contributor

gshank commented Sep 9, 2022

You need to run "changie new" to create a changelog entry. See CONTRIBUTING.md

@jtcohen6 jtcohen6 added Team:Language ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels Sep 12, 2022
@smitsrr
Copy link

smitsrr commented Sep 19, 2022

@gshank - any other changes required on this PR?

@gshank
Copy link
Contributor

gshank commented Sep 19, 2022

I think if you merge main into your branch, this is probably ready to go. There were some metrics attribute name changes so tests are failing.

@jared-rimmer
Copy link
Contributor Author

All done @gshank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
4 participants