Skip to content

HDDS-17109. Make Develocity remote usage optional - #11627

Merged
adoroszlai merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-17109
Oct 21, 2026
Merged

adoroszlai merged 3 commits into
apache:masterfrom
adoroszlai:HDDS-17109

Conversation

@adoroszlai

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

.mvn/develocity.xml currently enables:

  • local and remote build cache lookup
  • build scan collection
  • if authenticated (GitHub CI in apache/ozone): publishing build scans and saving to remote build cache

Remote Develocity server is set to the ASF's instance.

Changes proposed:

  • move existing config file to .mvn/develocity-asf.xml
  • create new .mvn/develocity.xml, which only enables local build cache, nothing else
  • use .mvn/develocity-asf.xml in CI via CLI options

Developers can opt-in to using ASF's Develocity using the same options.

Benefits:

  • avoid unintended usage of remote cache, which may falsify "reproducible build" results (e.g. in [reproducible-central|https://github.com/jvm-repo-rebuild/reproducible-central])
  • avoid local overhead and server-side load of remote cache lookups for builds that cannot possibly be cached there (e.g. company internal builds)
  • avoid overhead of scan data collection for local builds by default

https://issues.apache.org/jira/browse/HDDS-17109

How was this patch tested?

Verified that local cache is enabled by default, but remote cache is not:

$ mvn -N clean \
    -Dorg.slf4j.simpleLogger.log.develocity.goal.cache=debug
...
[DEBUG] Develocity Maven Extension: 2.6.0
[DEBUG] Using the build cache with the following configuration:
  Local build cache: enabled
      storeEnabled: true
      directory: ~/.m2/.develocity/build-cache
      cleanup: enabled
          retention: P7D
          interval: P1D
  Remote build cache: disabled:
      Build caching requires a Develocity server and none was specified.
...

Verified remote cache is enabled via the property used in CI workflows:

$ mvn -N clean \
    -Dorg.slf4j.simpleLogger.log.develocity.goal.cache=debug \
    -Ddevelocity.user.config=$(pwd)/.mvn/develocity-asf.xml
...
[DEBUG] Develocity Maven Extension: 2.6.0
[DEBUG] Using the build cache with the following configuration:
  Local build cache: enabled
      storeEnabled: true
      directory: ~/.m2/.develocity/build-cache
      cleanup: enabled
          retention: P7D
          interval: P1D
  Remote build cache: enabled
      url: https://develocity.apache.org/cache/
      authentication: none
      storeEnabled: false
...

CI:
https://github.com/adoroszlai/ozone/actions/runs/39220897550

@adoroszlai adoroszlai self-assigned this Oct 19, 2026
@github-actions github-actions Bot added the CI label Oct 19, 2026

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the patch! @adoroszlai Looks good overall, left a few small questions inline.

Also, should we add MAVEN_ARGS to repeat-acceptance.yml too?

Comment thread .mvn/develocity-asf.xml
under the License.

-->
<develocity

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just curious, could develocity-asf.xml only hold the overrides, since the configs are merged? Happy either way.

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.

Makes sense. Tested with the same command as in description.

Comment thread .mvn/develocity.xml
<fileFingerprints>false</fileFingerprints>
<buildLogging>false</buildLogging>
<testLogging>false</testLogging>
<resourceUsage>false</resourceUsage>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we set resourceUsage to true in develocity-asf.xml? I noticed master CI scans include CPU and memory charts today, but this false may carry over through the config merge.

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.

Added. I couldn't find a way to see the effective value (as opposed to the cache, which has the debug setting). /proc/cpuinfo etc. are read once with both values, so not sure what this does.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Per the docs, it controls the CPU / Memory / Disk / Network charts in the scan's Performance tab, e.g. https://develocity.apache.org/s/ze3mlrultacfs/performance. I think we can check the next master scan after the merge.

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @adoroszlai LGTM +1

@adoroszlai
adoroszlai marked this pull request as ready for review October 21, 2026 04:38
@adoroszlai
adoroszlai merged commit f40236a into apache:master Oct 21, 2026
76 checks passed
@adoroszlai
adoroszlai deleted the HDDS-17109 branch October 21, 2026 05:55
@adoroszlai

Copy link
Copy Markdown
Contributor Author

Thanks @chihsuan for the review.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants