ci: add optional openapi-max-workers input to component-service-profile-kotlin#279
Open
JesperTerkelsen wants to merge 1 commit intomainfrom
Open
ci: add optional openapi-max-workers input to component-service-profile-kotlin#279JesperTerkelsen wants to merge 1 commit intomainfrom
JesperTerkelsen wants to merge 1 commit intomainfrom
Conversation
7214475 to
7ba5486
Compare
…le-kotlin Adds a new opt-in input that maps to ./gradlew --max-workers=<n> for the OpenAPI build step only. Defaults to empty (existing behavior unchanged for all repos that don't set it). Motivation: monta-app/service-api-gateways has been failing every recent production deploy in this exact step (runs 25171374143, 25236336830, 25236336844). The pattern is identical: SIGTERM + exit 143 ~50s after `portal-api:kaptKotlin` starts while several other modules' kaptKotlin tasks run concurrently. Each kapt worker JVM uses ~4GB heap; with 4–8 in flight on a linux-arm64 runner, the kernel OOM-kills mid-build. Caller-side change in service-api-gateways will pass `openapi-max-workers: '2'` to opt in. Other repos using this workflow (single-module Micronaut services) keep full parallelism — they don't have the contention to begin with. The input is named for the step it scopes to (Build OpenAPI spec), not "gradle-max-workers", because it doesn't affect any other gradle invocations in this workflow or anywhere else.
7ba5486 to
1d876dc
Compare
1 task
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.
Summary
Adds an optional
openapi-max-workersinput tocomponent-service-profile-kotlin.yml. It maps to./gradlew --max-workers=<n>for the OpenAPI build step only. Defaults to empty — no behavior change for any existing caller.Motivation
monta-app/service-api-gatewayshas been failing every recent production deploy in theUpdate Service Profile / Build OpenAPI specstep. The pattern is identical across runs:Three example runs:
All three die ~50s after
portal-api:kaptKotlinstarts, with several other modules'kaptKotlintasks running concurrently. Exit code 143 is SIGTERM — the kernel OOM-killed the worker JVM. Each kapt worker uses-Xmx4096m; with 4–8 in flight onlinux-arm64, peak memory blows past the runner's available RAM.Why a configurable input rather than hardcoding
--max-workers=2Other Monta repos using this shared workflow are single-module Micronaut services (
service-vehicle,service-energy,service-audit-log, etc.) and have no parallelism contention to begin with. Hardcoding a cap would be a no-op for them functionally but a poor signal — so this PR keeps existing repos' behavior bit-for-bit and lets the affected repo opt in.Diff
Caller-side change (separate PR in service-api-gateways)
After this lands, the four deploy workflow files in
service-api-gateways(one per API) gain:Trade-off for that repo: roughly 30–60s slower OpenAPI step (worth it vs. failed deploys).
Out of scope
This PR only addresses parallelism in the
Build OpenAPI specstep of this single shared workflow. Other workflows (test, lint, build, deploy) are untouched. Other gradle invocations in this same workflow are untouched (theDiscover annotation processorstep uses a much lightertasks --allquery).🤖 Generated with Claude Code