Skip to content

Development: Use an internal Maven Central mirror to prevent dependency rate-limit errors in CI#12927

Merged
krusche merged 3 commits into
developfrom
chore/maven-central-mirror
Jun 16, 2026
Merged

Development: Use an internal Maven Central mirror to prevent dependency rate-limit errors in CI#12927
krusche merged 3 commits into
developfrom
chore/maven-central-mirror

Conversation

@krusche

@krusche krusche commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Builds and server tests resolve their Gradle dependencies directly from Maven Central. Because many CI jobs run concurrently behind a shared egress IP, this regularly triggers HTTP 429 Too Many Requests responses from Maven Central — and due to Gradle's blacklist-on-error behavior, a single 429 fails the whole build. This PR routes dependency resolution through the internal TUM AET Reposilite mirror (which proxies Maven Central and has no per-IP rate limit) as the preferred repository, and unifies the GitHub Actions Gradle dependency cache onto setup-gradle.

Checklist

General

Motivation and Context

CI experienced repeated Maven Central 429 Too Many Requests errors during dependency resolution. With many build/test jobs running concurrently behind a shared egress IP (the self-hosted aet-large-ubuntu runners in particular), the aggregate request volume crosses Maven Central's per-IP rate limit. Gradle (4.3+) does not fall through to the next repository on an HTTP error — it blacklists the repository and fails the build — so a single 429 aborts the job.

The TUM AET Reposilite instance proxies Maven Central from inside our own infrastructure and is not subject to a per-IP rate limit, so making it the preferred repository removes the root cause.

Description

Gradle — preferred mirror (with mavenCentral() kept as a fallback), added first in all three repository declaration sites:

  • settings.gradlepluginManagement.repositories (plugin + root buildscript classpath resolution)
  • build.gradle → top-level repositories (project / server dependencies)
  • gradle/openapi.gradlebuildscript.repositories (openapi-generator)

The mirror (https://reposilite.aet.cit.tum.de/releases) is listed first; mavenCentral() remains as a fallback, and the existing Spring-milestone / Gradle / Shibboleth repos and gradlePluginPortal() are kept for artifacts the mirror does not proxy.

GitHub Actions — Gradle caching via setup-gradle:

  • Standardized every server build/test workflow on gradle/actions/setup-gradle@v6 as the sole Gradle dependency-cache mechanism, removing the redundant cache: 'gradle' from setup-java where present (the two would otherwise contend for ~/.gradle).
  • setup-gradle prunes unused artifacts before saving, keeping cache entries lean — this reduces GitHub Actions cache eviction (10 GB/repo, LRU) and the dependency re-downloads it causes.
  • Added Gradle caching to ci-bean-instantiations.yml, which previously had none (full fresh download on every run).
  • All setup-gradle references use the floating @v6 tag and are kept consistent across: ci-build.yml, ci-test.yml, ci-quality.yml, ci-codeql.yml, ci-bean-instantiations.yml, nightly-lti-interop.yml, test-mysql.yml. (gradle/actions/wrapper-validation remains SHA-pinned.)

Resilience note: if the mirror is ever unreachable, the mavenCentral() fallback only reliably rescues the build when the host is fully DNS-unresolvable. On an HTTP 5xx/429 or connection timeout from the mirror, Gradle blacklists it and fails (the same behavior we have today with Maven Central). The mirror's own availability therefore matters; a warm Gradle cache (~/.gradle/caches) remains the primary protection for transient outages.

Steps for Testing

This change is verified by CI itself rather than by manual feature testing:

  1. Confirm all CI checks on this PR pass (Build, Test, CodeQL).
  2. In a CI job log (e.g. the ci-build WAR build), confirm dependency/plugin artifacts are fetched from reposilite.aet.cit.tum.de rather than repo1.maven.org.
  3. Confirm the Setup Gradle step reports a Gradle cache restore/save in each migrated workflow.

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

…al mirror

Add the TUM AET Reposilite (https://reposilite.aet.cit.tum.de/releases) as the
preferred (first-listed) repository in all Gradle repository declarations to
avoid Maven Central 429 rate-limit errors during build and server-test
dependency resolution. mavenCentral() is kept as a fallback. Sites updated:
settings.gradle (pluginManagement), build.gradle (project dependencies), and
gradle/openapi.gradle (openapi-generator buildscript).

Consolidate the GitHub Actions Gradle cache onto gradle/actions/setup-gradle in
every server build/test workflow and drop the redundant cache: 'gradle' on
setup-java (the two contend for ~/.gradle). setup-gradle prunes unused artifacts
before saving, keeping cache entries lean to reduce eviction and the resulting
dependency re-downloads. Adds Gradle caching to bean-instantiations.yml, which
previously had none. Workflows updated: build.yml, test.yml, test-mysql.yml,
codeql-analysis.yml, nightly-lti-interop.yml, bean-instantiations.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 15, 2026 14:11
@krusche krusche requested a review from a team as a code owner June 15, 2026 14:11
@github-project-automation github-project-automation Bot moved this to Work In Progress in Artemis Development Jun 15, 2026
@krusche krusche added this to the 9.5 milestone Jun 15, 2026
@krusche krusche self-assigned this Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a TUM-hosted reposilite Maven Central mirror (https://reposilite.aet.cit.tum.de/releases) as a named repository (reposiliteRepository) in three Gradle build files: the root build.gradle dependency repositories block, gradle/openapi.gradle buildscript repositories, and settings.gradle plugin management repositories.

Changes

Reposilite Maven Mirror Configuration

Layer / File(s) Summary
Add reposilite mirror to all Gradle repository blocks
settings.gradle, gradle/openapi.gradle, build.gradle
Registers reposiliteRepository pointing to https://reposilite.aet.cit.tum.de/releases in pluginManagement.repositories, buildscript.repositories, and the main repositories block respectively.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding an internal Maven Central mirror to prevent rate-limit errors in CI builds, which aligns with the core objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/maven-central-mirror

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves CI reliability by preferring an internal TUM AET Reposilite proxy for Maven Central (to avoid upstream 429 rate limiting) and by consolidating Gradle dependency caching in GitHub Actions onto gradle/actions/setup-gradle@v6.

Changes:

  • Added the internal Reposilite Maven Central mirror as the first Gradle repository for plugin resolution, build dependencies, and the OpenAPI buildscript.
  • Replaced actions/setup-java’s Gradle caching with gradle/actions/setup-gradle@v6 across the affected CI workflows to avoid cache contention and keep caches leaner.
  • Added Gradle caching to workflows that previously lacked it (e.g., bean instantiation checks).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
settings.gradle Prefer internal Reposilite mirror for Gradle plugin resolution, keeping Maven Central as fallback.
gradle/openapi.gradle Prefer internal Reposilite mirror for OpenAPI buildscript dependencies.
build.gradle Prefer internal Reposilite mirror for project dependency resolution.
.github/workflows/test.yml Use setup-gradle@v6 as the sole Gradle caching mechanism for server test/style jobs.
.github/workflows/test-mysql.yml Use setup-gradle@v6 as the sole Gradle caching mechanism for MySQL server tests.
.github/workflows/nightly-lti-interop.yml Add setup-gradle@v6 caching to the nightly LTI interop job.
.github/workflows/codeql-analysis.yml Add setup-gradle@v6 caching before the Gradle build used for CodeQL.
.github/workflows/build.yml Remove setup-java Gradle cache usage and standardize on setup-gradle@v6.
.github/workflows/bean-instantiations.yml Add setup-gradle@v6 caching to the bean instantiation workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Resolve conflicts from develop's CI consolidation (#12745), which renamed
the legacy workflows into the ci-*.yml umbrella structure:

- build.yml / test.yml: deleted by develop (now ci-build.yml / ci-test.yml /
  ci-quality.yml). Accepted the deletions.
- codeql-analysis.yml: develop turned it into a thin scheduled caller of the
  reusable ci-codeql.yml. Took develop's version.
- ci-bean-instantiations.yml: kept develop's `java-version: ${{ env.java }}`
  refactor; replaced `cache: 'gradle'` with the SHA-pinned setup-gradle@v6.

Carried this PR's caching consolidation onto the renamed successors so
setup-gradle@v6 remains the sole Gradle dependency-cache mechanism across
every server build/test workflow (ci-test, ci-quality, ci-codeql,
ci-bean-instantiations), matching the form develop already adopted in
ci-build.yml. Pinned the setup-gradle refs in test-mysql.yml and
nightly-lti-interop.yml to the same SHA and updated stale "See build.yml"
comments to ci-build.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 15, 2026
@FelixTJDietrich FelixTJDietrich temporarily deployed to playwright-e2e-tests June 15, 2026 14:38 — with GitHub Actions Inactive

@bensofficial bensofficial left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look good

Comment thread .github/workflows/ci-bean-instantiations.yml Outdated
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

End-to-End Test Results

Phase Status Details
All Tests ❌ Failed
TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
All E2E Tests Report (PR)278 ran273 passed3 skipped2 failed48m 33s
❌ Failed Tests
  • Group chat messages › Write/edit/delete message in group chat › Student should be able to edit a message in group chat (1m 29s)
  • Message interactions › Message forwarding › Forwarded reply renders its preview in the destination conversation (1m 28s)

Flakiness Scores for Failed Tests

Test Flakiness Score Default Branch Failure Rate Combined Failure Rate
e2e/course/CourseGroupChatMessages.spec.ts#Group chat messages › Write/edit/delete message in group chat › Student should be able to edit a message in group chat 0% 0.3% 0.3%
e2e/course/CourseMessageInteractions.spec.ts#Message interactions › Message forwarding › Forwarded reply renders its preview in the destination conversation 0% 50.9% 50.9%

Test Strategy: Running all tests (configuration or infrastructure changes detected)

Overall: ❌ E2E tests failed

🔗 Workflow Run · 📊 Test Report

Switch all gradle/actions/setup-gradle references from the SHA pin
(50e97c2, v6.1.0) to the floating major tag @v6, keeping all 7
references consistent (including ci-build.yml). The wrapper-validation
references are intentionally left SHA-pinned (separate, checksum-
sensitive action, out of scope for this PR).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@krusche krusche temporarily deployed to playwright-e2e-tests June 15, 2026 16:32 — with GitHub Actions Inactive

@FelixTJDietrich FelixTJDietrich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes look good to me, Claude Opus 4.8 usually insists on pinning workflows to follow best practices. AFAIK you can also make this compatible with renovate / other dependency automations, if it is not already. But using a major version with trusted workflows should usually be fine, especially on GitHub runners.

@krusche krusche merged commit bc1fe14 into develop Jun 16, 2026
72 of 78 checks passed
@krusche krusche deleted the chore/maven-central-mirror branch June 16, 2026 11:38
@github-project-automation github-project-automation Bot moved this from Work In Progress to Merged in Artemis Development Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants