goutamadwant opened a new pull request, #40386: URL: https://github.com/apache/beam/pull/40386
Adds cleanup for GCS buckets leaked by `GcsUtil` integration tests. Before: - Tests created randomized `apache-beam-temp-bucket-<UUID>` buckets. - A failed or interrupted teardown could leave those buckets indefinitely. - The scheduled cleanup workflow did not handle these buckets. After: - Lists buckets only from `apache-beam-testing` using the dedicated prefix. - Revalidates the complete `apache-beam-temp-bucket-<UUIDv4>` name before deletion. - Deletes only buckets older than 24 hours. - Defaults to dry-run; the scheduled Gradle task explicitly passes `--delete`. - Removes objects from leaked buckets before deleting them. - Continues processing after individual failures and reports failures at the end. - Runs the regression tests before the scheduled cleanup task. Validation: - `python3 -m unittest test_stale_cleaner.py test_stale_gcs_buckets_cleaner.py` — 29 tests passed. - `./gradlew :beam-test-tools:testStaleGcsBucketsCleaner` — passed. - `./gradlew :beam-test-tools:removeStaleGcsBuckets --dry-run` — Gradle wiring validated. - Python compilation and `git diff --check` passed. - Independent correctness and security reviews found no remaining P0, P1, or P2 issues. `CHANGES.md` is not updated because this only changes internal test infrastructure. Fixes #40347 -- 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]
