Skip to content

Cache Gradle distributions with MASS fallback - #12095

Draft
AlexeyKuznetsov-DD wants to merge 2 commits into
masterfrom
alexeyk/gitlab-mass-gradle-cache-fallback
Draft

Cache Gradle distributions with MASS fallback#12095
AlexeyKuznetsov-DD wants to merge 2 commits into
masterfrom
alexeyk/gitlab-mass-gradle-cache-fallback

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • Bootstraps the root Gradle wrapper through MASS_READ_URL and retries with services.gradle.org if MASS is unavailable.
  • Caches nested-build and Gradle TestKit distributions under .gradle/wrapper, which is already included in the GitLab dependency cache.
  • Reuses one safely provisioned distribution across concurrent smoke-test tasks and nested TestKit runs.
  • Tries MASS before upstream for the WildFly, Tomcat, and CICS distribution repositories.

Motivation

Smoke tests downloaded the same Gradle 8.x distributions repeatedly, increasing load on the MASS pool and may causing intermittent GitLab failures when the pool was exhausted or temporarily unreachable.

This keeps internal infrastructure as the preferred source while allowing Gradle builds to continue when MASS cannot serve a distribution.

Additional Notes

  • Downloads use retries, locking, completion markers, and checksum verification when a .sha256 file is available.
  • Ivy repository fallback covers MASS cache misses (404); Gradle does not advance to another repository on connection errors.
  • Added coverage for fallback ordering, cache reuse, interrupted installs, invalid archives, and concurrent provisioning.
  • The existing nightly GitLab dependency-cache population remains unchanged.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jul 28, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: no release notes Changes to exclude from release notes type: refactoring comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM labels Jul 28, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.69% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: f39515c | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.01 s 14.00 s [-0.6%; +0.7%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 13.04 s [-1.6%; -0.1%] (maybe better)
startup:petclinic:appsec:Agent 16.49 s 16.64 s [-5.1%; +3.3%] (no difference)
startup:petclinic:iast:Agent 16.82 s 16.83 s [-0.8%; +0.8%] (no difference)
startup:petclinic:profiling:Agent 16.73 s 16.21 s [-1.4%; +7.8%] (no difference)
startup:petclinic:sca:Agent 16.85 s 16.75 s [-0.4%; +1.5%] (no difference)
startup:petclinic:tracing:Agent 16.00 s 15.98 s [-0.7%; +1.0%] (no difference)

Commit: f39515c2 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

internal const val MASS_READ_URL_ENV = "MASS_READ_URL"

/** Public Gradle distribution source. */
internal const val UPSTREAM_DISTRIBUTIONS_BASE_URL = "https://services.gradle.org/distributions"

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.

Can this be read from an ENV instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really sure, there no other URLs other than https://services.gradle.org/distributions or am I missing something?

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

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants