Skip to content

[ci] Retry installing gradle/wrapper up to 5 times #105787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

brianseeders
Copy link
Contributor

@brianseeders brianseeders commented Feb 23, 2024

Gradle wrapper does not have a built-in mechanism to retry downloads/installs, and downloads timeout fairly frequently.

Calling ./gradlew --version will cause gradlew to install everything without doing any other real work. Let's use that in a retry loop.

Adding this retry mechanism to these two scripts should cover almost all of CI.

@brianseeders brianseeders marked this pull request as ready for review February 23, 2024 17:13
@brianseeders brianseeders requested a review from a team as a code owner February 23, 2024 17:13
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although, one question is how often are our CI builds actually downloading the wrapper? It should already be cached on CI agents. Does this only happen occasionally, like when we bump the wrapper version or do we consistently see that builds are having to download the wrapper?

@brianseeders
Copy link
Contributor Author

@elasticmachine merge upstream

@brianseeders
Copy link
Contributor Author

LGTM, although, one question is how often are our CI builds actually downloading the wrapper? It should already be cached on CI agents. Does this only happen occasionally, like when we bump the wrapper version or do we consistently see that builds are having to download the wrapper?

@mark-vieira I somehow didn't realize, but the original complaint was actually for the lucene builds (I've added this there). I believe we should only download it between bumps and next image build. Still seems worth adding here since it's already done?

@mark-vieira
Copy link
Contributor

@mark-vieira I somehow didn't realize, but the original complaint was actually for the lucene builds (I've added this there). I believe we should only download it between bumps and next image build. Still seems worth adding here since it's already done?

Sure.

Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there by now any more gradle invocations?

@brianseeders
Copy link
Contributor Author

are there by now any more gradle invocations?

just checked, still looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants