chore: route Gradle distribution through MASS pull-through cache#11461
chore: route Gradle distribution through MASS pull-through cache#11461jzh0u wants to merge 1 commit into
Conversation
Fix GRADLE_VERSION to match gradle-wrapper.properties (8.14.5). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master resultsStartup Time
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
AlexeyKuznetsov-DD
left a comment
There was a problem hiding this comment.
LGTM, I can see on CI in logs:
Downloading https://mass-read.us1.ddbuild.io/internal/artifact/services.gradle.org/distributions/gradle-8.14.5-bin.zip
.............10%.............20%.............30%.............40%.............50%.............60%..............70%.............80%.............90%.............100%
But let's get review from @bric3 too.
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 558c98298f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties | ||
| - sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties | ||
| # Route Gradle distribution download through MASS pull-through cache | ||
| - sed -i "s|distributionUrl=https\\\\://services.gradle.org/|distributionUrl=https\\\\://${MASS_READ_URL#https://}/internal/artifact/services.gradle.org/|" gradle/wrapper/gradle-wrapper.properties |
There was a problem hiding this comment.
Fix sed pattern to match escaped Gradle URL
This substitution never matches gradle/wrapper/gradle-wrapper.properties because the search pattern resolves to distributionUrl=https\://services.gradle.org/ with a single backslash before :, while the file contains https\:// (a literal backslash before ://). As a result, CI leaves distributionUrl unchanged and still downloads from services.gradle.org, so the new MASS pull-through routing does not actually take effect.
Useful? React with 👍 / 👎.
| # Route Gradle distribution download through MASS pull-through cache | ||
| - sed -i "s|distributionUrl=https\\\\://services.gradle.org/|distributionUrl=https\\\\://${MASS_READ_URL#https://}/internal/artifact/services.gradle.org/|" gradle/wrapper/gradle-wrapper.properties |
There was a problem hiding this comment.
Minor note, I asked Codex to make this change to be a bit more human-readable:
| # Route Gradle distribution download through MASS pull-through cache | |
| - sed -i "s|distributionUrl=https\\\\://services.gradle.org/|distributionUrl=https\\\\://${MASS_READ_URL#https://}/internal/artifact/services.gradle.org/|" gradle/wrapper/gradle-wrapper.properties | |
| # Route Gradle distribution download through MASS pull-through cache | |
| - | | |
| mass_read_host="${MASS_READ_URL#https://}" | |
| mass_read_host="${mass_read_host%/}" | |
| sed -i "/^distributionUrl=/ s|services.gradle.org|${mass_read_host}/internal/artifact/services.gradle.org|" gradle/wrapper/gradle-wrapper.properties |
WDYT?
There was a problem hiding this comment.
I like the local vars, but I have doubt on the sed expression. I'm reviewing from mobile so…
bric3
left a comment
There was a problem hiding this comment.
Pre-approving, but Gitlab is probably "hydrating" gradle from a cache. I believe this might prevent gradle wrapper from fetching from MASS. I didn't look at the commit history so bear with me if I missed something, otherwise I'd say that in order to test this properly there could be a commit adding a line that deletes .gradle before the main job script executes. Then remove that change before adding the PR to the merge queue.
| DEPENDENCY_CACHE_POLICY: pull | ||
| BUILD_CACHE_POLICY: pull | ||
| GRADLE_VERSION: "8.14.4" # must match gradle-wrapper.properties | ||
| GRADLE_VERSION: "8.14.5" # must match gradle-wrapper.properties |
@bric3 AFAIK nightly |
Summary
mass-read.us1.ddbuild.io) instead of directly hittingservices.gradle.orgMASS_READ_URLCI variable pointing to the prod MASS read endpointGRADLE_VERSIONto match the version ingradle/wrapper/gradle-wrapper.properties(8.14.5)How it works
A
sedinbefore_scriptrewritesgradle-wrapper.propertiesat CI time:MASS pull-through is already enabled in prod (
mass-pullthrough-enabledfeature flag). Theservices.gradle.orgdomain is already in the MASS egress allowlist.Test plan
distributionUrlPart of DPCYMGMT-3608.
🤖 Generated with Claude Code