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

BigQuery: address dataset leaks #6099

Merged
merged 5 commits into from
Sep 25, 2018
Merged

BigQuery: address dataset leaks #6099

merged 5 commits into from
Sep 25, 2018

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Sep 25, 2018

Toward #6098.

Closes #6097.

@tseaver tseaver added api: bigquery Issues related to the BigQuery API. flaky labels Sep 25, 2018
@tseaver tseaver requested a review from tswast September 25, 2018 20:30
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 25, 2018
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

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

I'd actually recommend doing something similar to googleapis/python-bigquery-pandas#216 where I use a pytest fixture to cleanup any leftover datasets without having to list all of them (which is quite flaky in BigQuery, unfortunately).

pattern = re.compile(
'|'.join('^{}.*$'.format(prefix) for prefix in prefixes))

ds_items = list(client.list_datasets())

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver tseaver merged commit 2823215 into master Sep 25, 2018
@tseaver tseaver deleted the 6098-bigquery-dataset_leaks branch September 25, 2018 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. flaky testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants