Skip to content

Maven wrapper caching does not seem to cache enough #1095

Description

@headius

Description:

setup-java was recently modified (2 weeks ago) to also cache Maven distributions used by the mvnw wrapper script. See #1027.

JRuby's build uses setup-java@v5 but we are still seeing failed downloads of the distribution. We would expect this to have been cached long ago, either by us or by other projects, so this is unexpected.

See a failure as recently as yesterday, associated with a PR to attempt to reduce these failures: https://github.com/jruby/jruby/actions/runs/28970521797/job/85964762963

Task version:

setup-java@v5 as of the time of the above build.

Platform:

  • Ubuntu
  • macOS
  • Windows

I know we see it on Ubuntu, but I believe it has affected builds on other platforms as well. It does not appear to be specific to any platform.

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

The build below shows a failed mvnw wrapper download that killed a JRuby CI job.

https://github.com/jruby/jruby/actions/runs/28970521797/job/85964762963

Expected behavior:

We use cache: maven and setup-java@v5 so we expected that the wrapper would not be downloaded from Maven Central and would not trigger this error.

Actual behavior:

As others have reported, rate-limiting or similar restrictions at the Ruby Central level appear to be causing mvnw dist downloads to fail occasionally. We want to use setup-java caching to prevent re-downloading of this distribution, since it almost never changes. That does not appear to be happening.

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions