Skip to content

Commit 9c6155a

Browse files
astubbsclaude
andcommitted
ci: fix PIT minion OOM + history cache path
Two issues from the last run's logs: 1. MEMORY_ERROR: PIT minions were OOM'ing. Changed -DargLine="" to -DargLine="-Xmx1g" so minion JVMs get 1GB heap (still strips Jacoco since we're replacing the full argLine). 2. History cache miss: PIT ignores -DhistoryInputLocation CLI flags when -DwithHistory is set, writing to /tmp/{groupId}.{artifactId}... instead. Updated actions/cache path to match PIT's actual location (/tmp/*_pitest_history.bin). Dropped the explicit location flags and mkdir since PIT manages its own path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d882bd6 commit 9c6155a

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/maven.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,34 +213,37 @@ jobs:
213213
java-version: '17'
214214
cache: 'maven'
215215
# Restore PIT history for incremental analysis — only re-mutates
216-
# code that changed since last run.
216+
# code that changed since last run. PIT writes its history to /tmp/
217+
# with a filename derived from groupId.artifactId.version, ignoring
218+
# explicit -DhistoryInputLocation CLI flags when -DwithHistory is set.
217219
- name: Restore PIT history cache
218220
uses: actions/cache@v4
219221
with:
220-
path: parallel-consumer-core/target/pit-history
222+
path: /tmp/*_pitest_history.bin
221223
key: pit-history-${{ github.base_ref }}-${{ hashFiles('**/src/main/**/*.java') }}
222224
restore-keys: |
223225
pit-history-${{ github.base_ref }}-
224226
pit-history-
225-
# -DargLine="" strips Jacoco from PIT minions (PIT has its own coverage)
227+
# -DargLine="-Xmx1g" gives minion JVMs 1GB heap (default is too small,
228+
# causes MEMORY_ERROR) and strips Jacoco (PIT has
229+
# its own coverage).
226230
# -DtimeoutConstant/Factor generous per-mutation timeout for CI hardware
227231
# -Dthreads=1 I/O-bound tests; parallelism adds contention not speed
228-
# -DwithHistory incremental: skips re-mutating unchanged code
232+
# -DwithHistory incremental: skips re-mutating unchanged code.
233+
# PIT writes history to /tmp/{groupId}.{artifactId}...
234+
# which we cache above via actions/cache.
229235
# targetClasses: internal.* only — the core engine where mutations matter most.
230-
# Broadening to io.confluent.parallelconsumer.* hit GitHub's 6h job cap.
236+
# Broadening to io.confluent.parallelconsumer.* hit GitHub's 6h job cap (#41).
231237
- name: Run PIT mutation testing
232238
run: |
233-
mkdir -p parallel-consumer-core/target/pit-history
234239
./mvnw --batch-mode -Pci test-compile org.pitest:pitest-maven:mutationCoverage \
235240
-Dlicense.skip \
236241
-DtargetClasses="io.confluent.parallelconsumer.internal.*" \
237242
-DtargetTests="io.confluent.parallelconsumer.*" \
238-
-DargLine="" \
243+
-DargLine="-Xmx1g" \
239244
-DtimeoutConstant=30000 -DtimeoutFactor=3.0 \
240245
-Dthreads=1 \
241246
-DwithHistory \
242-
-DhistoryInputLocation=target/pit-history/history.bin \
243-
-DhistoryOutputLocation=target/pit-history/history.bin \
244247
-pl parallel-consumer-core -am
245248
- name: Upload PIT report
246249
if: always()

0 commit comments

Comments
 (0)