Skip to content

Conversation

@kiraksi
Copy link
Contributor

@kiraksi kiraksi commented Dec 4, 2023

This PR:

  • Uses prefixer function in conftest from python-test-utils to assign IDs to datasets in samples/snippets
  • If dataset IDs already exist with the same name, those get deleted at start time
  • Primarily, this ensures that any tests that are stopped or crash do not leave dataset resources behind

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #590 🦕

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Dec 4, 2023
@kiraksi kiraksi changed the title Cleanup resources at startup chore: cleanup resources at startup Dec 4, 2023
@kiraksi kiraksi marked this pull request as ready for review December 13, 2023 18:55
@kiraksi kiraksi requested review from a team as code owners December 13, 2023 18:55
@kiraksi kiraksi requested review from alvarowolfx, engelke and tswast and removed request for alvarowolfx and engelke December 13, 2023 18:55
@chalmerlowe
Copy link
Collaborator

@kiraksi Per our discussion:

  • please figure out whether we need individual mechanisms to create prefixes in our tests OR if we can rely upon the mechanisms in conftest to do it globally.
@chalmerlowe chalmerlowe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 8, 2024
@kiraksi kiraksi force-pushed the cleanup-resources-at-startup branch from 4704e7a to 1a9dbe6 Compare January 10, 2024 18:29
Copy link
Collaborator

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM

@chalmerlowe chalmerlowe merged commit ffe8059 into googleapis:main Jan 17, 2024
@kiraksi kiraksi deleted the cleanup-resources-at-startup branch January 17, 2024 20:08
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 googleapis/python-bigquery API. size: s Pull request size is small.

3 participants