Repository navigation
ci(inkless): fix Gradle caching, add PR cancellation, and shard tests - #923
Merged
Merged
Conversation
Inkless CI wall-clock p50 grew from 30 minutes to over 50 minutes because
two issues compounded each other:
- `validate` ran `generateJooqClasses` before `setup-gradle`, creating
`~/.gradle` first and causing `setup-gradle` to skip cache restoration
(0.16% build-cache hit rate). It also omitted `-PcommitId`, busting
downstream build-cache keys on every commit, and both `validate` and
`test` passed undefined `inputs.gradle-cache-*` values so every PR wrote
1-2 GB into the 10 GB repository cache pool.
- `test` ran seven `./gradlew` invocations serially with
`-PmaxParallelForks=2`, and all heavy cluster test classes serialized on
one fork while the other fork sat idle.
Fix both and eliminate redundant runs:
- Add `concurrency` cancellation for pull requests so superseding pushes
stop in-flight runs.
- Drop `ready_for_review` from `pull_request` types and remove the unused
`is-draft` step: draft PRs already run the full workflow, so switching
a PR to ready re-ran the same SHA.
- Move JOOQ generation and verification into a parallel `jooq-check` job
(added to `Inkless CI result`'s `needs`) so `validate` starts with an
empty `~/.gradle` and restores caches cleanly.
- Set `gradle-cache-read-only: ${{ github.ref != 'refs/heads/main' }}` and
pass `-PcommitId=xxxxxxxxxxxxxxxx` in `validate`.
- Add `-PexcludeTests` support in `build.gradle` and split `test` into
four parallel shards per Java version (`storage-inkless`, `core-switch`,
`core-consolidation`, and catch-all `core-other-and-kafka`), raising
default `-PmaxParallelForks` to 3 and dropping the duplicate
`:storage:inkless:integrationTest` call.
Assisted-by: Gemini 4 Neon
jeqo
force-pushed
the
jeqo/ci-tier1-optimizations
branch
from
December 1, 2026 15:23
bd272ba to
32b409f
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The workflow leaves inklessTag commit-dependent, invalidating version-file and downstream runtime-classpath cache keys on every commit; both jobs need a stable inklessTag alongside commitId.
No open issues 🎉
What changed in this PR
This PR targets longer Inkless CI runtimes by improving Gradle cache reuse, canceling superseded pull-request runs, and distributing tests across parallel jobs.
Changes:
- Move JOOQ verification into a separate required job and restrict Gradle cache writes to
main. - Split tests into four shards per Java version, with shard-specific artifacts and configurable test exclusions.
- Cancel superseded PR runs and remove the duplicate integration-test invocation.
| File | Description |
|---|---|
build.gradle |
Add excludeTests support for catch-all test shards. |
.github/workflows/inkless.yml |
Update caching, isolate JOOQ verification, add PR cancellation, and shard tests. |
Review effort: Balanced
…ility `determineInklessTag()` falls back to `git describe --tags --match inkless-* --always --dirty`, which changes on every commit and feeds `inputs.property "inklessTag"` on every `createVersionFile` task. Pass `-PinklessTag=unknown` alongside `-PcommitId=xxxxxxxxxxxxxxxx` in both `validate` and `test` so version files and downstream JARs keep stable cache keys across commits. Assisted-by: Gemini 4 Neon
jeqo
marked this pull request as ready for review
December 2, 2026 08:12
gqmelo
approved these changes
Dec 2, 2026
This was referenced Dec 3, 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.
Inkless CIwall-clock p50 grew from 30 minutes to over 50 minutes becausevalidateruns JOOQ code generation beforesetup-gradle(leaving~/.gradlenon-empty and blocking cache restoration), PR runs write to the 10 GB repository cache pool via undefinedinputs.*flags, andtestruns seven Gradle invocations serially on two forks. BecauseInkless CI resultaggregates all required jobs under one check name, splittingjooq-checkand shardingtestacross parallel runners keeps branch rules intact while cutting wall-clock time.Commits
ci(inkless): fix Gradle caching, add PR cancellation, and shard testsci(inkless): pin inklessTag in validate and test for build-cache stabilitySee the commit messages for the reasoning behind each step.
Workflow changes
Verify JOOQ classes(jooq-check) job and includes it inInkless CI result.testinto four shards per Java version (storage-inkless,core-switch,core-consolidation, and catch-allcore-other-and-kafka) and scopes JUnit/thread-dump/build-scan artifacts by${{ matrix.java }}-${{ matrix.shard }}.concurrencycancellation, drops the redundantready_for_reviewtrigger, and restricts Gradle cache writes tomain.Test plan
-PexcludeTestsand multi-project per-task--testsfiltering locally on:clients:testand:server:testto confirm excluded classes skip execution while remaining classes and modules run in one invocation.Inkless CIon this PR: all 12 jobs pass (4 shards × 2 JDKs,validate,jooq-check,inkless-version-tag, andInkless CI result).