Skip to content

ci: leave the extracted IDEs out of the Actions cache, which they overflowed, and retry a refused download for a minute - #2175

Merged
lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:ci/cache-without-extracted-ides
Nov 24, 2026
Merged

lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:ci/cache-without-extracted-ides

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

What

Main's last CI run, for 436b029, failed on Windows before any test ran:

Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugins-bom/2.3.21/kotlin-gradle-plugins-bom-2.3.21.pom'.
> Received status code 429 from server: Too Many Requests

The job had no cache to start from: setup-gradle said "Gradle User Home cache not found. Will initialize empty.", so it
downloaded every dependency again.

Why there was no cache: the repository's Actions cache holds 12.2 GB, over GitHub's 10 GB per repository. Every
entry in it was saved in the 20 minutes before this PR, all on main. The biggest are gradle-transforms entries of 3.9,
3.3 and 0.9 GB. They are the IDEs that the IntelliJ Platform Gradle plugin extracts as Gradle artifact transforms, one
per job and platform version. Each push to main saves them again for the 5 test jobs, the plugin build and the
verifier. GitHub then evicts the oldest entries, the other jobs' downloads among them, and the next run of those jobs
fetches everything from Maven Central and JetBrains again.

Change

  • The cache: every setup-gradle step leaves caches/transforms-4 and caches/*/transforms out of the Actions
    cache, with gradle-home-cache-excludes. setup-gradle deletes them before it saves. These are ci.yml, buildZip.yml,
    IJ.yml, IJ-latest.yml (3 steps), nightly.yml and release.yml.
    • The downloads themselves stay cached (gradle-dependencies, now 1.3 to 2 GB an entry), so the entries fit in
      10 GB, and Gradle extracts an IDE again from its cached download without a network access.
    • Locally the IDEs are in caches/9.9.2/transforms/*/transformed/extracted.
  • Retries: Gradle 9.9.2 already retries a download refused with a server error or a 429
    (NetworkingIssueVerifier), but only 3 times, 1 and 2 seconds apart. gradle.properties raises that to 6 times, 2,
    4, 8, 16 and 32 seconds apart, with systemProp.org.gradle.internal.network.retry.max.attempts and .initial.backOff,
    which NetworkOperationBackOffAndRetry reads. A local build prints them back as 6 and 2000 from an init script.

The other CI failures this week

I went through the 22 failed "Java CI with Gradle" runs since 2026-11-17:

Check

A pull request reads the cache but doesn't write it, so this PR's own CI can't show the saving. After the merge, the
next run on main should leave the repository's cache under 10 GB, and the run after it should restore each job's entry.
I'll check both.

…rflowed, and retry a refused download for a minute

The entries that the CI jobs save on main reached 12.2 GB, over the
repository's 10 GB, most of it the IDEs that Gradle extracts as artifact
transforms (3.9, 3.3 and 0.9 GB). GitHub then evicted the other jobs'
entries, so a job found no cache ("Gradle User Home cache not found") and
downloaded everything again. On 436b029, Maven Central answered the
Windows job "429 Too Many Requests" before any test ran.

- setup-gradle deletes caches/transforms-4 and caches/*/transforms before
  it saves. Gradle extracts an IDE again from its cached download.
- Gradle retries a download refused with a server error or a 429 six times,
  2 to 32 seconds apart, instead of three times in 3 seconds.
@lagergren lagergren added this to the 0.30.2 milestone Nov 24, 2026
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated build and release workflows to avoid retaining selected Gradle transformation caches, reducing unnecessary cached data.
    • Increased Gradle’s retry handling for temporary repository errors, including rate limits. Retries use a growing delay between attempts, helping builds recover from intermittent download failures.

Gradle setup in six GitHub Actions workflows now excludes two transform-cache paths. gradle.properties sets a six-attempt maximum for network retries and a 2,000 ms initial backoff.

Changes: Gradle CI configuration

Layer / File(s) Summary
Gradle workflow cache exclusions
.github/workflows/IJ-latest.yml, .github/workflows/IJ.yml, .github/workflows/buildZip.yml, .github/workflows/ci.yml, .github/workflows/nightly.yml, .github/workflows/release.yml
Gradle setup steps exclude caches/transforms-4 and caches/*/transforms from the cache. The ci.yml comments describe the stated cache-size and IDE-download effects.
Gradle network retry settings
gradle.properties
Gradle’s maximum network retry attempts are set to 6, with an initial backoff of 2,000 ms. A comment describes retries for repository errors and HTTP 429 responses.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: angelozerr, fbricon

Merge Risk: Minimal · up to 4a8db

This change trims the CI cache and lengthens Gradle download retries. It does not affect shipped product behavior. The risk to merge is minimal; the benefit can only be confirmed by cache size and CI results after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two changes in the PR: leaving extracted IDEs out of the Actions cache, and retrying refused downloads for longer. The raw summary confirms both: cache excludes for caches/transfor…
Description check Passed The description explains the cause (the Actions cache exceeded 10 GB, so entries were evicted), the change (cache excludes in the workflows and higher Gradle retry settings), and the verification plan…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two changes in the PR: leaving extracted IDEs out of the Actions cache, and retrying refused downloads for longer. The raw summary confirms both: cache excludes for caches/transforms-4 and caches/*/transforms, and Gradle network retry settings in gradle.properties. The title is specific and matches the main change.

Full details: Description check

Explanation

The description explains the cause (the Actions cache exceeded 10 GB, so entries were evicted), the change (cache excludes in the workflows and higher Gradle retry settings), and the verification plan. It relates directly to the changeset.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7722d541-5d8d-40db-9f24-7dc7ef3bf6cb
Commits

Reviewing files that changed from the base of the PR and between 436b029 and 4a8db3c.

Files selected for processing: 7

  • .github/workflows/IJ-latest.yml
  • .github/workflows/IJ.yml
  • .github/workflows/buildZip.yml
  • .github/workflows/ci.yml
  • .github/workflows/nightly.yml
  • .github/workflows/release.yml
  • gradle.properties

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.12%. Comparing base (436b029) to head (4a8db3c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2175   +/-   ##
=======================================
  Coverage   54.12%   54.12%           
=======================================
  Files         831      831           
  Lines       35275    35275           
  Branches     5527     5527           
=======================================
  Hits        19092    19092           
  Misses      13364    13364           
  Partials     2819     2819           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lagergren
lagergren merged commit 8098f41 into redhat-developer:main Nov 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant