-
Notifications
You must be signed in to change notification settings - Fork 316
fix: ensure AccessEntry equality and repr uses the correct entity_type
#2182
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I did a mini-TDD for this. Both of these tests fail without the changes in dataset.py
.
@@ -746,6 +755,13 @@ def test_dataset_property_with_condition(self, condition_1): | |||
assert "dataset" in entry._properties | |||
assert "condition" in entry._properties | |||
|
|||
def test_repr_from_api_repr(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check the array of AccessEntry works too? The g3 failed tests show the None
entity type in the array: https://screenshot.googleplex.com/B88hiRSwcAfeE49
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 0cfa704
Also verified that the added test fails until the changes in dataset.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Approved
Thanks for submitting this PR. Much appreciated, Tim. |
Discovered while updating the internal version of google-cloud-bigquery. Without this fix, it was causing this test to fail: https://github.com/dbt-labs/dbt-bigquery/blob/0995665e490cdee9c408d26aac8e1c19fefaebe0/tests/unit/test_dataset.py#L25
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕