schizophrenicmaniac opened a new pull request, #40669: URL: https://github.com/apache/beam/pull/40669
The flaky test detection job calls the Grafana alertmanager API with a plain `requests.get`. That call has no timeout and no retry, so any blip on metrics.beam.apache.org fails the whole run. This change uses a session with urllib3 `Retry`: 5 retries with backoff on connection errors and 429/5xx responses, plus a 30s timeout. If Grafana is still failing after that, the run fails as it did before. `get_workflow_issues()` also called `issue.get_labels()` for every open and closed `flaky_test` issue, which is one extra API request per issue. The labels already come with the issue listing, so it now reads `issue.labels`. I added `test_flaky_test_detection.py` next to the existing tool tests. It covers alert parsing, retrying after a 503, no retry on a 404, the timeout, and the label lookup. The Grafana tests run against a small local HTTP server, so the real retry path is exercised. Fixes #40662 -- 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]
