Skip to content

Use configured mirrors for buildSrc tests - #12389

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
alexeyk/route-buildsrc-test-dependencies-through-depot
Sep 3, 2026
Merged

Use configured mirrors for buildSrc tests#12389
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
masterfrom
alexeyk/route-buildsrc-test-dependencies-through-depot

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Routes buildSrc/ TestKit builds through the dependency mirrors that automated builds already configure via MAVEN_REPOSITORY_PROXY / GRADLE_PLUGIN_PROXY, and removes the tests' remaining reliance on the public Maven Central.

  • Adds buildSrc/src/test/resources/repository-proxy.init.gradle.kts, applied to every TestKit build by GradleFixture. It rewrites the well-known Maven Central and Gradle Plugin Portal URLs to the configured mirrors, across the project, buildscript, pluginManagement and dependencyResolutionManagement repository containers. With neither variable set it is a no-op, so the zero-configuration local workflow is unchanged.
  • GradleFixture.run() gains an unsetEnv parameter, so a test can exercise the "no mirror configured" path even though CI exports both variables globally.
  • RangeQueryTest no longer performs a live range query against Maven Central: it publishes the versions it asserts on into a local fixture repository and checks them exactly.
  • The muzzle excluded-transitive-dependency test publishes its transitive artifact into the fixture repository instead of pulling Guava from Maven Central, and probes the Maven descriptor rather than loading a Guava class.
  • GradleFixtureTest covers the redirection itself: project-level, settings-level, and the unmirrored passthrough.
  • Documents the opt-in flag and the mirror propagation in docs/how_to_work_with_gradle.md.

Scope note: this is limited to the Gradle-level repositories of TestKit builds. Muzzle's own Aether resolution (MuzzleMavenRepoUtils.defaultMuzzleRepos) is unchanged from master — per review feedback it stays as-is until the mirror exposes a separate index.

Motivation

Keep build-logic tests consistent with the repository configuration used by automated builds, while preserving a zero-configuration local workflow for contributors.

Additional Notes

Validation — the full buildSrc suite (24 test classes), run twice from a cleaned test-results directory:

./gradlew -p buildSrc :test -PrunBuildSrcTests --rerun
Configuration Result
MAVEN_REPOSITORY_PROXY / GRADLE_PLUGIN_PROXY unset 199 tests, 198 passed, 1 skipped, 0 failures
both pointed at the Depot mirror CI uses 199 tests, 198 passed, 1 skipped, 0 failures

The single skip in each run is by design: the two defaultMuzzleRepos tests are gated on whether MAVEN_REPOSITORY_PROXY is set, so exactly one applies per environment and the pair covers both branches across the two runs.

Contributor Checklist

Jira ticket: N/A

@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 Sep 3, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Sep 3, 2026
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review September 3, 2026 00:52
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested review from a team as code owners September 3, 2026 00:52
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T00:56:12.313157Z 7b493be Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot 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.

Datadog Autotest: PASS

More details

The code keeps public repositories when no proxy exists. It uses the configured mirror when a proxy exists, with no reportable defect.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 7b493be · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-datadog-prod-us1-2

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

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.06 s 13.88 s [+0.5%; +2.1%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.93 s 12.95 s [-0.8%; +0.6%] (no difference)
startup:petclinic:appsec:Agent 17.02 s 16.72 s [+1.0%; +2.7%] (maybe worse)
startup:petclinic:iast:Agent 16.89 s 17.03 s [-1.9%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.60 s 16.92 s [-2.9%; -0.8%] (maybe better)
startup:petclinic:sca:Agent 16.85 s 16.74 s [-0.4%; +1.7%] (no difference)
startup:petclinic:tracing:Agent 16.20 s 16.04 s [+0.1%; +1.9%] (maybe worse)

Commit: fe2110e0 · 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.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/gitlab resync-job-status --bypass-required-checks-syncing-strategy

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 3, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-03 02:43:46 UTC ℹ️ Start processing command /gitlab resync-job-status --bypass-required-checks-syncing-strategy


2026-09-03 02:50:21 UTC ℹ️ Devflow: /gitlab resync-job-status --bypass-required-checks-syncing-strategy

392 jobs status updated and 582 skipped for a total of 974 jobs, 1 pipeline status(es) synced

@bric3 bric3 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.

Test kit changes looks good to me.


Currentlu, this PR still has muzzle [6/8] failing.

23 failures, and it seems it cause problems on transitive dependencies as well, Zuul task receives the Depot 403 for Log4j 2.12.1, and since the repo is configured to fallback to maven central we get the 429 Too Many Request.

Caution

Also this silently could narrow muzzle coverage I believe. The version range only see what depot has, which we know is sometimes incorrect.

For the above reason I would at least split the PR on the test kit fix, and another on muzzle.

Comment thread docs/how_to_work_with_gradle.md Outdated
Comment thread buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/MuzzleMavenRepoUtils.kt Outdated
Comment thread buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/MuzzleMavenRepoUtils.kt Outdated
Comment thread buildSrc/src/test/resources/repository-proxy.init.gradle Outdated
@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge -f --reason "Fix for Gradle build, have to skip MQ, all tests passed on PR"

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Sep 3, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-03 20:05:17 UTC ℹ️ Start processing command /merge -f --reason "Fix for Gradle build, have to skip MQ, all tests passed on PR"


2026-09-03 20:05:22 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-09-03 20:05:31 UTC ℹ️ MergeQueue: This merge request was merged

Warning

This change was merged without running any pre merge CI checks

Reason: Fix for Gradle build, have to skip MQ, all tests passed on PR

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 224fc05 into master Sep 3, 2026
600 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/route-buildsrc-test-dependencies-through-depot branch September 3, 2026 20:05
@github-actions github-actions Bot added this to the 1.66.0 milestone Sep 3, 2026
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