Skip to content

ci: default Kotlin gradle-args to --parallel --build-cache [NOJIRA]#318

Closed
tobias0106 wants to merge 1 commit into
mainfrom
chore/default-gradle-build-cache
Closed

ci: default Kotlin gradle-args to --parallel --build-cache [NOJIRA]#318
tobias0106 wants to merge 1 commit into
mainfrom
chore/default-gradle-build-cache

Conversation

@tobias0106

Copy link
Copy Markdown
Contributor

Why

service-wallet#4478 sped up its Sonar step by overriding gradle-args in the caller: --parallel --build-cache instead of the shared default --no-daemon --parallel. Dropping --no-daemon lets the test/sonar/coverage steps share one warm Gradle daemon, and --build-cache lets later invocations reuse outputs.

This promotes that optimization to the shared Kotlin workflows so every Kotlin service gets it as the default, instead of each repo overriding per-caller.

What

Change the gradle-args input default from --no-daemon --parallel to --parallel --build-cache in all reusable Kotlin/Gradle workflows:

  • pull-request-kotlin.yml
  • sonar-cloud.yml
  • code-coverage-kotlin.yml
  • component-test-kotlin.yml
  • deploy-kotlin.yml
  • deploy-kotlin-v2.yml

Input-only change — callers that already pass an explicit gradle-args are unaffected.

Risk / tradeoffs

  • Blast radius: all Kotlin services that rely on the default. The daemon now persists within/between jobs on the runner. On the standard large/blacksmith runners this is the intended setup.
  • Any service can revert to the old behaviour by passing gradle-args: "--no-daemon --parallel" explicitly.

Draft — open for review before un-drafting.

🤖 Generated with Claude Code

…ows [NOJIRA]

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tobias0106 tobias0106 marked this pull request as ready for review June 25, 2026 10:55
@tobias0106 tobias0106 requested a review from a team as a code owner June 25, 2026 10:55
@tobias0106 tobias0106 requested review from maoanran and removed request for a team June 25, 2026 10:55
@JesperTerkelsen

JesperTerkelsen commented Jun 25, 2026

Copy link
Copy Markdown
Member

Be careful making this default across all projects - this can break stuff if tests are not supporting parallel runs - perhaps introduce a parameter instead ?

@morten-andersen morten-andersen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like it - but a scary change - we risk blocking a lot of kotlin services - and quite a few people are out for vacation in many teams

@tobias0106

Copy link
Copy Markdown
Contributor Author

Be careful making this default across all projects - this can break stuff if tests are not supporting parallel runs - perhaps introduce a parameter instead ?

Fair point. Also a risky PR.
Lets migrate one project at the time with the parameters.

@tobias0106 tobias0106 closed this Jun 25, 2026
@tobias0106

Copy link
Copy Markdown
Contributor Author

I like it - but a scary change - we risk blocking a lot of kotlin services - and quite a few people are out for vacation in many teams

Would just be cool to streamline things across all Kotlin services, but I agree it's not worth the risk. Appreciate the feedback! :praise

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.

3 participants