8000 BigQuery: address dataset leaks by tseaver · Pull Request #6099 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content

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
@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
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
0