Skip to content

build: apply the Develocity Common Custom User Data sbt plugin - #3546

Open
clayburn wants to merge 1 commit into
apache:mainfrom
clayburn:common-custom-user-data-sbt-plugin
Open

clayburn wants to merge 1 commit into
apache:mainfrom
clayburn:common-custom-user-data-sbt-plugin

Conversation

@clayburn

Copy link
Copy Markdown
Contributor

Motivation

Pekko publishes Build Scans to develocity.apache.org, but does not apply the Common Custom User Data (CCUD) sbt plugin. Without it, scans lack the shared tags, links and custom values that make scans searchable and comparable across builds:

  • a tag for the operating system
  • a tag for how the build was invoked (IDE or command line)
  • a tag for CI builds, plus tags, links and custom values specific to the CI provider
  • for CI builds of a Git repository, the commit id, branch name, status, and whether the checkout was dirty

Modification

Add sbt-develocity-common-custom-user-data 1.5.0 to project/plugins.sbt, next to the existing sbt-develocity plugin.

No change to PekkoDevelocityPlugin is needed. CCUD 1.5.0 registers itself through internalDevelocityConfigurationTransformers, a key introduced in sbt-develocity 1.4.5 — the version Pekko already uses. On that path CCUD composes after the build's own develocityConfiguration rather than redefining the setting, so Pekko's server URL, publishing predicate, IP obfuscation, disabled local build cache and project id are all left intact. (On sbt-develocity older than 1.4.5 CCUD would instead redefine develocityConfiguration, which is the case worth worrying about here — Pekko is past it.)

The plugin is released by Gradle under the Apache 2.0 licence.

Result

Build Scans published from Pekko builds carry the standard CCUD tags, links and custom values.

References

https://github.com/gradle/common-custom-user-data-sbt-plugin

Motivation:
Pekko publishes Build Scans to develocity.apache.org but does not apply
the Common Custom User Data (CCUD) sbt plugin. Without it, scans lack the
shared tags, links and custom values that make scans searchable and
comparable across builds: a tag for the operating system, a tag for how
the build was invoked (IDE or command line), CI provider tags, links and
custom values, and — for CI builds of a Git repository — the commit id,
branch name, status and whether the checkout was dirty.

Modification:
- Add sbt-develocity-common-custom-user-data 1.5.0 to project/plugins.sbt,
  next to the existing sbt-develocity plugin.

No change to PekkoDevelocityPlugin is needed. CCUD 1.5.0 registers itself
through internalDevelocityConfigurationTransformers, a key introduced in
sbt-develocity 1.4.5, which is the version Pekko already uses. On that
path CCUD composes after the build's own develocityConfiguration rather
than redefining the setting, so Pekko's server URL, publishing predicate,
IP obfuscation, disabled local build cache and project id are all left
intact.

The plugin is released by Gradle under the Apache 2.0 licence.

Result:
Build Scans published from Pekko builds carry the standard CCUD tags,
links and custom values. Scala Steward will track future CCUD releases;
no pin or ignore rule in .scala-steward.conf excludes com.gradle.

Tests:
- sbt "show develocityConfiguration" - server is still
  https://develocity.apache.org, publishing predicate and IP obfuscation
  are still PekkoDevelocityPlugin's, LocalBuildCacheImpl(false,...) is
  still disabled and the project id is still pekko; identical to the same
  command run on unmodified main.
- sbt "show ThisBuild/internalDevelocityConfigurationTransformers" -
  List() on unmodified main, List(<function1>) with the plugin applied,
  confirming CCUD registers through the supported sbt-develocity 1.4.5+
  path rather than overriding develocityConfiguration.
- sbt scalafmtSbtCheck - success.
- No directional test added: this is a build-plugin change with no
  production code path and no hook into the repository's test harness.
- Native scalafmt is not installed locally; used the sbt scalafmt tasks.

References:
None - https://github.com/gradle/common-custom-user-data-sbt-plugin
@pjfanning

Copy link
Copy Markdown
Member

We don't even use the existing develocity results. It is probably better just to take all of this stuff out of Pekko.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants