pjfanning opened a new pull request, #1904:
URL: https://github.com/apache/pekko-connectors/pull/1904
### Motivation
`SdkAsyncHttpClient.close()` is an AutoCloseable-style method that SDK
callers do not expect to throw, but the builder's shutdown handle blocks with
`Await.result(..., 10s)` and could propagate a `TimeoutException` (or any
termination failure) out of `close()`. Separately, every client built without
an explicit `ActorSystem` created a system named `aws-pekko-http`, so multiple
clients in one JVM produced identically named actor systems that are
indistinguishable in logs and thread names.
### Modification
- `PekkoHttpClient.close()` now catches `NonFatal` failures from the
shutdown handle and logs a warning instead of throwing.
- Auto-created actor system names get a monotonically increasing suffix
(`aws-pekko-http-1`, `aws-pekko-http-2`, ...).
- The client's actor system is exposed as `private[awsspi]` for the new
tests (binary-additive).
### Result
`close()` never throws to SDK callers, and each auto-created client gets a
uniquely named actor system.
### Tests
- `sbt "aws-spi-pekko-http/Test/testOnly
org.apache.pekko.stream.connectors.awsspi.PekkoHttpClientSpec"` — 13 passed,
including 2 new directional tests ("give each auto-created client a uniquely
named actor system", "not propagate failures from the shutdown handle on
close()"); both fail without the fix
- `sbt "aws-spi-pekko-http/Test/testOnly ...RequestRunnerSpec
...PekkoHttpClientH1TestSuite"` — 8 passed
- `sbt "aws-spi-pekko-http/mimaReportBinaryIssues"` — no issues
- `scalafmt --mode diff-ref=origin/main` — clean; no Java files changed, no
new files (no header changes needed)
### References
None - hardening found during a review of the aws-spi-pekko-http client
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]