Skip to content

build: onboard to ASF Develocity (develocity.apache.org) for build scans #257

Open

Description

@adityamparikh

Status: PR #258 by @adityamparikh is open and covers steps 2 to 4 of the issue (build, CI, docs). For step 1, the PR body says Infra enabled the DEVELOCITY_ACCESS_KEY secret for this repo in INFRA-28504. Unverified: the ticket needs a Jira login and repo secrets aren't listable without write access. The PR's fork CI runs are action_required.
Size: S — the code is written. What remains is a CI approval, a review and a merge.

What PR #258 does

  • settings.gradle.kts applies com.gradle.develocity 4.6.0 and com.gradle.common-custom-user-data-gradle-plugin 2.8.0.
    • It sets server = "https://develocity.apache.org" and projectId = "solr-mcp".
    • Scans publish only on CI, or locally with -Pscan, and only with an authenticated key.
    • IP addresses are obfuscated. Scans are tagged with the JDK, PR and the workflow name.
  • ci.yml, build-and-publish.yml and native.yml export DEVELOCITY_ACCESS_KEY from secrets.DEVELOCITY_ACCESS_KEY at workflow level. A composite action can't read secrets, so this can't live in .github/actions/setup-java as the issue suggested.
  • dev-docs/DEVELOPMENT.md gets a Build Scans section with the scan list and the 90-day test-history links.

Fork PRs receive no secrets, so #258's own runs publish nothing. The first scan comes from build-and-publish.yml on main after the merge.

What remains

Out of scope

The remote build cache. It needs a separate write-scoped CI user and key from Infra (issue section "Follow-up"). Open a new issue for it once scans are live.

File and line references are against main at 7cb39a3d.

Original description

What

Publish Gradle build scans from solr-mcp's CI to the ASF Develocity instance at
develocity.apache.org, the way apache/solr already does.

Why

  • CI failures are hard to diagnose today. Fork PRs need committer approval before CI runs, and
    the only evidence of a failure is the raw log. A build scan gives a shareable page with task
    timings, the full test report, failures, dependency resolution and the environment.
  • Flaky tests become visible. The Testcontainers integration tests and the Solr compatibility
    matrix (-Dsolr.test.image=...) fail intermittently. Develocity's test history aggregates results
    across runs, so a flake shows up as a pattern instead of a one-off red build. Solr links its
    history from dev-docs/FAQ.adoc:
    https://develocity.apache.org/scans/tests?search.rootProjectNames=solr*.
  • No new infrastructure. The ASF runs the instance for its projects at no cost.

Proposed change

  1. Infra access. Ask Infra (a PMC member files the INFRA Jira ticket, per
    infra.apache.org/gradle.html and the
    onboarding instructions)
    to onboard apache/solr-mcp and confirm which Actions secret carries the access key. Some
    projects use the shared DEVELOCITY_ACCESS_KEY (e.g. Publish build scans to develocity.apache.org and update Develocity plugins samza#1723); apache/solr uses a
    project-scoped SOLR_DEVELOCITY_ACCESS_KEY.
  2. Build. In settings.gradle.kts, apply com.gradle.develocity and
    com.gradle.common-custom-user-data-gradle-plugin, and configure:
    • server = "https://develocity.apache.org" and projectId = "solr-mcp", so scans are
      attributed to this project on the shared instance.
    • publishing.onlyIf { it.authenticated } on CI. Fork PRs receive no secrets, so they don't
      publish and the build is unaffected. Locally, publish only when opted in with -Pscan.
    • IP-address obfuscation and tags for the JDK version, PR and the workflow name, matching
      Solr's gradle/develocity.gradle.
  3. CI. Export the access key as DEVELOCITY_ACCESS_KEY in the ci.yml,
    build-and-publish.yml and native.yml jobs that run ./gradlew. Do this in the shared
    .github/actions/setup-java composite action where possible, so it lives in one place.
  4. Docs. Add the test-history link for solr-mcp to dev-docs.

Follow-up: remote build cache

The remote build cache is onboarded separately: Infra creates a dedicated CI user and a write-scoped
key. Without one, writes return 403 (apache/grails-core#16346, INFRA-27642 / INFRA-28501). Once
build scans are live, we can request that key so that CI on main writes to the cache and PRs and
laptops read from it.

Activity

  1. adityamparikh commented on Oct 12, 2026

    @adityamparikh
    ContributorAuthor

    Infra onboarding (step 1) is tracked in INFRA-28504. The build and CI changes are in #258.

  2. added a commit that references this issue on Oct 12, 2026
    f4a5f5e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions