ci: publish KMP Build Scans and cache to the OSS Community Develocity instance - #1027
ci: publish KMP Build Scans and cache to the OSS Community Develocity instance#1027jamesarich wants to merge 2 commits into
Conversation
… instance Replaces the self-hosted HttpBuildCache with Develocity's remote cache at community.develocity.cloud under project `meshtastic`, matching the Meshtastic-Android onboarding (meshtastic/Meshtastic-Android#6531). Covers the KMP leg of this repo only — the buf, deno and cargo builds are unaffected. - `packages/kmp/gradle/develocity.settings.gradle` replaces `packages/kmp/gradle/build-cache.settings.gradle`. - All four `setup-gradle` call sites across kmp-pull-request.yml, publish-kmp.yml (2) and snapshot-kmp.yml gain an optional develocity-access-key; the GRADLE_CACHE_* env blocks are removed. - Scans publish only from authenticated builds, so fork PRs and developers without a provisioned key are unaffected; only authenticated CI runs write to the cache. The GRADLE_CACHE_* secrets are no longer read but are deliberately left in place as the rollback path.
|
Warning Review limit reached
Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe KMP build replaces the shared Gradle build-cache script with Develocity configuration. Workflows pass ChangesDevelocity integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant GradleSetup
participant Gradle
participant Develocity
GitHubActions->>GradleSetup: Provide DEVELOCITY_ACCESS_KEY
GradleSetup->>Gradle: Configure the KMP build
Gradle->>Develocity: Publish scans and access remote cache
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest Buf updates on your PR. Results from workflow pull-request / build (pull_request).
|
Same-repository pull requests DO receive repository secrets, so gating cache
writes on the presence of DEVELOCITY_ACCESS_KEY alone let a PR build write
entries into the shared cache. The self-hosted HttpBuildCache this replaced
gated on GITHUB_EVENT_NAME and excluded pull_request; that protection was lost
in the port and is restored here.
Verified against a real CI-shaped environment:
CI=true GITHUB_EVENT_NAME=pull_request -> pull-only
CI=true GITHUB_EVENT_NAME=push -> writes enabled
CI=true GITHUB_EVENT_NAME=merge_group -> writes enabled
Local builds are still excluded by isCI, and fork PRs have no key at all.
Publishes Build Scans® and moves the remote build cache for the KMP leg of
this repo to the OSS Community Develocity instance at
https://community.develocity.cloud under project ID
meshtastic, matching theMeshtastic-Android onboarding (meshtastic/Meshtastic-Android#6531) and the rest
of the org rollout (meshtastic/kzstd#36, meshtastic/gradle-flatpak-sources#28,
meshtastic/MQTTastic-Client-KMP#118, meshtastic/meshtastic-sdk#91).
The buf, deno and cargo builds are untouched — only
packages/kmpis a Gradlebuild, so it is the only part Develocity can see.
What changed
packages/kmp/gradle/develocity.settings.gradlereplacespackages/kmp/gradle/build-cache.settings.gradle. The cache now comes fromDevelocity, so scan and cache configuration are one concern in one file.
HttpBuildCacheis replaced byremote(develocity.buildCache).setup-gradlecall sites —kmp-pull-request.yml,publish-kmp.yml(×2) andsnapshot-kmp.yml— gain an optionaldevelocity-access-key. TheGRADLE_CACHE_URL/GRADLE_CACHE_USERNAME/GRADLE_CACHE_PASSWORDenv blocks are removed from all three.Behaviour
publishing.onlyIf { it.authenticated }).Fork PRs and developers without a provisioned key publish nothing rather than
failing.
cannot poison it. CI disables the local cache — runners are ephemeral and
every hit comes from the remote anyway.
external process names are obfuscated to constants.
Verification
cd packages/kmp && ./gradlew build— BUILD SUCCESSFUL, 79 tasks, scanpublished under root project name
protobufs.On the kzstd pilot this configuration measured a 59% build-time avoidance ratio
on the second CI run, entirely from remote cache hits.
Two pre-existing issues found while verifying (neither caused by this PR)
Both reproduce on a clean
mastercheckout:packages/kmpis not configuration-cache compatible.build.gradle.ktsruns
git describe --tags --abbrev=0at configuration time, which Gradlerejects under
--configuration-cache. The build does not enable theconfiguration cache today, so nothing is broken — but it cannot be enabled
until that call moves to a
ValueSource/providers.exec../gradlew buildneedsANDROID_HOME, which the repo does not documentand which no
local.propertiesprovides.packages/kmphas an Androidtarget, so a fresh checkout fails with "SDK location not found".
Note for reviewers
The
GRADLE_CACHE_*repository secrets are now unused but deliberately notdeleted — they are the rollback path.
Summary by CodeRabbit
Documentation
Build Improvements