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 adapter_response for test #6645

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

aezomz
Copy link
Contributor

@aezomz aezomz commented Jan 18, 2023

Add adapter_response for dbt test

resolves #2964
or partial resolve?

Description

Checklist

@aezomz aezomz requested review from a team and ChenyuLInx January 18, 2023 15:32
@cla-bot
Copy link

cla-bot bot commented Jan 18, 2023

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @aezomz

@aezomz aezomz marked this pull request as draft January 18, 2023 15:37
@aezomz aezomz force-pushed the add-dbttest-adapterresponse branch from 69a2c8f to f9fae84 Compare January 18, 2023 15:38
@cla-bot cla-bot bot added the cla:yes label Jan 18, 2023
@aezomz aezomz force-pushed the add-dbttest-adapterresponse branch from f9fae84 to 4cd498e Compare January 18, 2023 15:44
@aezomz aezomz marked this pull request as ready for review January 18, 2023 15:45
@aezomz aezomz requested a review from a team as a code owner January 18, 2023 15:45
@aezomz aezomz requested a review from VersusFacit January 18, 2023 15:45
Copy link
Contributor

@ChenyuLInx ChenyuLInx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! This looks good! Can we also do similar thing for freshness task?
Also do you think you can look up functional tests that test those two functions and add some test there?(link for freshness, for test maybe add some additional check here?)
How to run functional tests(link). Once you setup you can also just do pytest testfilename.py

@aezomz
Copy link
Contributor Author

aezomz commented Jan 19, 2023

Thanks for contributing! This looks good! Can we also do similar thing for freshness task? Also do you think you can look up functional tests that test those two functions and add some test there?(link for freshness, for test maybe add some additional check here?) How to run functional tests(link). Once you setup you can also just do pytest testfilename.py

Can u share where can I get the adapter response for freshness? I couldn't find it
https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/adapters/base/impl.py#L1072

Big thank you for pointing me to the test that i should update with.

@aezomz aezomz force-pushed the add-dbttest-adapterresponse branch from 4cd498e to cdb6c01 Compare January 19, 2023 09:25
@jtcohen6 jtcohen6 added Team:Adapters Issues designated for the adapter area of the code ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels Jan 19, 2023
@jtcohen6
Copy link
Contributor

Seconding, thanks for the contribution @aezomz!

Can u share where can I get the adapter response for freshness? I couldn't find it
https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/adapters/base/impl.py#L1072

Check out this comment from a few months ago: #2964 (comment)

And this commit (though might need some rework given other changes): a066c1e

@aezomz aezomz force-pushed the add-dbttest-adapterresponse branch from cdb6c01 to 8f76389 Compare January 19, 2023 17:38
@aezomz aezomz requested a review from a team as a code owner January 19, 2023 17:38
@aezomz
Copy link
Contributor Author

aezomz commented Jan 19, 2023

@jtcohen6 , thanks for the guidance. I will never figure this out on my own.

There is some mypy errors that i suppressed since its returning AttrDict now, feel free to suggest a better way.
I did some pytest to ensure all is passing. But will see from CI if there are anything else breaking.

Copy link
Contributor

@ChenyuLInx ChenyuLInx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aezomz Thanks for adding this function to both test and freshness!!! Looks great to me

@elyobo
Copy link

elyobo commented Feb 27, 2023

🎉 thanks @aezomz!

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 Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1635] Populate adapter_response for tests + sources
4 participants