Skip to content

[CI] Download maven dependencies firstly - #1556

Merged
v1v merged 4 commits into
elastic:masterfrom
v1v:feature/download-before-build
Dec 8, 2020
Merged

[CI] Download maven dependencies firstly#1556
v1v merged 4 commits into
elastic:masterfrom
v1v:feature/download-before-build

Conversation

@v1v

@v1v v1v commented Dec 7, 2020

Copy link
Copy Markdown
Member

What does this PR do?

  • Use go-offline prebuild to fetch all the dependencies.
  • Set maven.wagon.httpconnectionManager.ttlSeconds to 25 seconds and maven.wagon.http.retryHandler.count to 3 retries.

Why

I still see issues related to the connection reset :/

Further details

The documentation for maven.wagon.httpconnectionManager.ttlSeconds is available in the source code:

Documentation for maven.wagon.http.retryHandler.count is in https://maven.apache.org/wagon/wagon-providers/wagon-http/

This is similar to the change made in Pulsar: apache/pulsar#8386

@v1v v1v added automation Tests & automation that help build & maintain the project ci labels Dec 7, 2020
@v1v
v1v requested review from a team December 7, 2020 11:51
@v1v v1v self-assigned this Dec 7, 2020
@v1v v1v changed the title Feature/download before build [CI] Download maven dependencies with some retries firstly Dec 7, 2020
@ghost

ghost commented Dec 7, 2020

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #1556 updated

  • Start Time: 2020-12-07T16:16:18.167+0000

  • Duration: 52 min 58 sec

Test stats 🧪

Test Results
Failed 0
Passed 1629
Skipped 12
Total 1641

@eyalkoren

Copy link
Copy Markdown
Contributor

Ahh, it fails at self artifacts that are only created at mvn install - https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-java%2Fapm-agent-java-mbp/detail/PR-1556/1/pipeline

@v1v

v1v commented Dec 7, 2020

Copy link
Copy Markdown
Member Author

Good catch, I enabled the --fail-never in the packer-cache.sh script, but I did not enable this in the script. I'll do it now

@eyalkoren

Copy link
Copy Markdown
Contributor

Maybe you can use excludeGroupIds to exclude resolving co.elastic.apm dependencies?

@v1v v1v changed the title [CI] Download maven dependencies with some retries firstly [CI] Download maven dependencies firstly Dec 7, 2020
@v1v

v1v commented Dec 7, 2020

Copy link
Copy Markdown
Member Author

Unfortunately excludeGroupIds does not get honoured for a multimodule maven project. Might be related to MDEP-516

I've tried locally with:

  • ./mvnw -U org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline -DexcludeGroupIds=co.elastic.apm
  • Even I added some changes in the pom.xml but same behaviour

So, the alternative is to run go-offline with never fail once and might reduce the number of times we hit the issue :/

@v1v
v1v merged commit 35fd21e into elastic:master Dec 8, 2020
@v1v
v1v deleted the feature/download-before-build branch December 8, 2020 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-java automation Tests & automation that help build & maintain the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants