Prevent nested smoke builds from falling back to Maven Central - #12491
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Nested build scripts can add Maven Central after the init hook. Existing Vert.x and WildFly smoke builds do this, so proxy-only jobs can still send dependency requests to Maven Central.
🤖 Datadog Autotest · Commit f70ab11 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
amarziali
left a comment
There was a problem hiding this comment.
I left a comment raised by codex as P2. Otherwise lgtm
The init script injects the repository proxy and redirectMavenCentral() rewrites any mavenCentral() the nested build declares onto that same URL, so both the plugin-management and project repository lists end up holding the proxy twice. They stay distinct Gradle repositories, duplicating metadata and artifact requests on every cache miss. Drop the redundant entries, keeping the repository this script injected: it is the only one known to be unrestricted. A declared mavenCentral() may carry content filters or narrowed metadata sources that the redirect does not lift, so keeping such a declaration instead would stop resolving whatever it excludes. Containers this script never injected into are left untouched, so nothing removes a proxy the nested build owns outright. Also handle a repository declared without a URL, which would otherwise fail with a NullPointerException thrown from an injected init script rather than Gradle's own error. The test fixture now declares Maven Central with a content filter before the injection happens, which is the ordering that makes the choice of survivor observable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
70576ed to
0dfd0c6
Compare
|
/merge -f --reason "This is a fix for test build, no need to run MQ, tested on PR" |
|
View all feedbacks in Devflow UI.
The expected merge time in
Warning This change was merged without running any pre merge CI checks Reason: This is a fix for test build, no need to run MQ, tested on PR |
What Does This Do
Prevents nested smoke-test Gradle builds from registering Maven Central when the Maven repository proxy is configured.
Adds end-to-end coverage that verifies the nested plugin-management and project dependency repository lists contain the configured proxy and do not contain Maven Central.
Motivation
GitLab builds are required to resolve Maven artifacts only through Depot. They must not fall back to Maven Central when the Depot proxy is configured.
The root build and build-logic settings already follow this policy, but the init script injected into nested smoke-test builds still registered Maven Central unconditionally. Dynamic dependency resolution could therefore contact Maven Central directly even when Depot was available, exposing GitLab jobs to Maven Central rate limits.
This extends the repository policy introduced in #12403 and #12404 to nested smoke-test builds.
Additional Notes
The GitLab smoke-test failure contained this dependency-resolution stack trace:
Validation:
The build-logic smoke-test suite ran 27 tests with no failures or skips.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [N/A]