bvolpato opened a new pull request, #40863: URL: https://github.com/apache/beam/pull/40863
YAML integration fixtures use `ExitStack`. If a later fixture fails during setup, the exception reaches the BigQuery fixture at `yield` and skips its dataset deletion. In [this run](https://github.com/apache/beam/actions/runs/40142994753), datasets were created before Bigtable setup failed, and their cleanup was never reached. Move dataset cleanup into `finally` after creation, covering both optional table setup and errors from the test or another fixture. The fixture now calls deletion as the stack unwinds, using the existing request to delete the dataset and its contents. Focused regression cases failed against the original helper because deletion was never called, then passed with the fix. They use the real Beam and BigQuery API modules with mocked cloud clients. Formatting and lint checks passed, including a check that missing optional dependencies skip the tests. No live cloud resources were used. <!-- Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). - [x] Replace these instructions with a description of your change and why you have made it. - [ ] Mention the appropriate issue in your description (for example: `addresses #123` or `fixes #456`). - [ ] Update `CHANGES.md` with noteworthy changes. See [CONTRIBUTING.md]() for more details. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
