Skip to content

Fix failure when BigQuery row access policy return empty result#14986

Merged
ebyhr merged 1 commit intomasterfrom
ebi/bigquery-access-policy
Nov 11, 2022
Merged

Fix failure when BigQuery row access policy return empty result#14986
ebyhr merged 1 commit intomasterfrom
ebi/bigquery-access-policy

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Nov 10, 2022

Description

Fixes #14760

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# BigQuery
* Fix failure when [row access policy](https://cloud.google.com/bigquery/docs/row-level-security-intro) returns an empty result. ({issue}`14760`)

@cla-bot cla-bot bot added the cla-signed label Nov 10, 2022
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should this be in a finally block (in addition to in the test) to avoid leaking policies when assertion fails?

Or do policies go away as tables get dropped?

Copy link
Copy Markdown
Member Author

@ebyhr ebyhr Nov 10, 2022

Choose a reason for hiding this comment

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

I couldn't find the official docs about it, but policies go away when dropping tables as far as I confirmed.

@ebyhr ebyhr force-pushed the ebi/bigquery-access-policy branch from 8a9fb29 to 5c8c80b Compare November 10, 2022 22:42
@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Nov 10, 2022

Added a missing assertEventually to testSelectTableWithRowAccessPolicyFilterPartialRow

@ebyhr ebyhr force-pushed the ebi/bigquery-access-policy branch from 5c8c80b to 63c0904 Compare November 11, 2022 00:31
@ebyhr ebyhr merged commit ccc06a5 into master Nov 11, 2022
@ebyhr ebyhr deleted the ebi/bigquery-access-policy branch November 11, 2022 01:09
@ebyhr ebyhr mentioned this pull request Nov 11, 2022
@github-actions github-actions bot added this to the 403 milestone Nov 11, 2022
@ebyhr ebyhr self-assigned this Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

BigQuery connector throws error on a table with a row access policy

2 participants