chore(build): Decrease Maven Wagon Connection Pool TTL #3012
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is meant to deal with the "connection reset" problem when downloading artifacts from Maven Central.
Facts:
Hypothesis:
Maven has its own connection pooling system as documented at https://issues.apache.org/jira/browse/WAGON-545 So even when JDK pooling is disabled there is still a pool on a higher level.
Azure infra kills idle TCP connections while tests are running
When Core tests are finished Maven starts building the Benchmark module. The Benchmark module uses a different Maven Clean plugin version -> Maven wants to download this version by using a connection from its pool. When this connection happens to be killed by Azure then Maven fails to download the clean plugin -> Build Error
Assuming the hypothesis above is correct then decreasing TTL on connection in the Maven pool should eliminate the errors. In fact, it's documented at https://issues.apache.org/jira/browse/WAGON-545?focusedCommentId=16755035&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16755035
If just decreasing TTL won't help then the next step is to disable the Maven pool entirely.