damccorm opened a new pull request, #41204: URL: https://github.com/apache/beam/pull/41204
## Summary Fixes repeated `botocore.exceptions.ConnectionClosedError: Connection was closed before we received a valid response from endpoint URL: "http://localhost:4566/"` failures in `KinesisTest::test_only` across `PostCommit YAML Xlang Direct` (runs `43012453285`, `42966180016`, `42923879023`) and `PostCommit YAML Xlang Dataflow` (runs `42966472109`, `42924185773`). ### Root Cause In `_create_kinesis_stream` (`sdks/python/apache_beam/yaml/integration_tests.py`) and `KinesisHelper.create_stream` (`sdks/python/apache_beam/io/external/xlang_kinesisio_it_test.py`), `time.sleep(2)` was placed before `break` inside the `try:` block rather than inside `except Exception:`. When the `localstack/localstack:3.8.1` container is still starting up on port 4566, `kinesis_client.create_stream(...)` raises `ConnectionClosedError`, jumping into `except Exception:` and bypassing `time.sleep(2)` so all retry attempts execute immediately with zero delay. ### Changes - Move `time.sleep(2)` into the `except Exception:` block after the final-attempt check in both `_create_kinesis_stream` and `KinesisHelper.create_stream`. - Increase `retries` from `10` to `15` (waiting up to 30 seconds for LocalStack initialization). ### Verification - Triggered `beam_PostCommit_Yaml_Xlang_Direct.yml` workflow run on branch: [`43019476250`](https://github.com/apache/beam/actions/runs/43019476250) -- 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]
