Skip to content

BigQuery: address dataset leaks - #6099

Merged
tseaver merged 5 commits into
masterfrom
6098-bigquery-dataset_leaks
Sep 25, 2018
Merged

tseaver merged 5 commits into
masterfrom
6098-bigquery-dataset_leaks

Conversation

@tseaver

@tseaver tseaver commented Sep 25, 2018 •

Copy link
Copy Markdown
Contributor

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
@tseaver
tseaver requested a review from theacodes as a code owner September 25, 2018 20:30
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 25, 2018
@tseaver
tseaver force-pushed the 6098-bigquery-dataset_leaks branch from 94b050e to ed76f14 Compare September 25, 2018 21:24

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

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