ci: partial-clone (blob:none) the Kotlin PR checkouts - #327
Merged
Conversation
JesperTerkelsen
marked this pull request as ready for review
August 17, 2026 11:06
JesperTerkelsen
requested review from
chandrashekar-dhar
and removed request for
a team
August 17, 2026 11:06
pull-request-kotlin.yml checks out with fetch-depth:0 (full history, needed for SonarQube new-code blame) but no blob filter, so it downloads every historical version of every file. Add filter: blob:none to both checkouts: keeps all commits and trees (what blame needs) and fetches file blobs lazily only when blame touches a changed file. This reusable workflow is called on pull_request by ~37 repos, so the faster checkout benefits every caller. Validated on monorepo-typescript (PR #7398): checkout -42% (19s->12s, non-overlapping distributions, p~1e-5) with no SonarQube scan regression.
JesperTerkelsen
force-pushed
the
ci/sonar-checkout-blob-filter
branch
from
August 17, 2026 11:09
7373bf9 to
5ecb4f7
Compare
tobias0106
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
filter: blob:noneto bothfetch-depth: 0checkouts in the reusablepull-request-kotlin.yml.fetch-depth: 0(needed for SonarQube new-code blame) with no blob filter downloads every historical version of every file.blob:nonekeeps all commits and trees — which blame needs — but fetches file blobs lazily, only when blame touches a changed file. Faster checkout, identical Sonar accuracy.Why it matters
This reusable workflow runs
gradlew sonaron every PR for ~37 caller repos (service-wallet, service-ocpp, service-control, service-charges, service-search, … and thelibrary-*repos). A one-line change here speeds the PR checkout for all of them.Evidence
Validated first on
monorepo-typescript(PR #7398), 10 runs vs 20 baseline:Risk / rollout
testshards in monorepo-typescript.gradlew sonarunchanged). This workflow already exposessonar-non-blocking, so a hiccup won't hard-block a PR.Opened as draft for CI/feedback before requesting review.