glideapps / glideapps/quicktype

elm CI flake: Warmup.elm fixture setup races the compiler (elm-stuff file locks / MVar deadlock)

Open
#3,064 0 comments 0 reactions 0 assignees View on GitHub
CI
Dominant language
TypeScript
Stars
13.9k
Forks
1.2k
Avg merge
8h 53m
Merged PRs (30d)
369

Description

## What happens

The `elm` / `schema-elm` fixture jobs intermittently fail in the fixture-setup step, before any schema or JSON sample is tested. Setup runs `rm -rf elm-stuff && elm make Warmup.elm`, and the `rm -rf` races the Elm compiler's use of `elm-stuff`, deadlocking on file locks.

## Evidence

- **Signature:** Elm compiler crash during the `rm -rf elm-stuff && elm make Warmup.elm` step — `elm-stuff/*.dat withBinaryFile: resource busy (file locked)`, with a thread blocked indefinitely in an MVar operation. The failure is in setup output, not in any test's round-trip comparison.
- **Affected PRs (2):** #3004, #2968. Both touch only TS-as-input / unrelated code, and their fixtures passed in every other language job. The crash happens before any schema is tested.

## Impact

Because the fixture matrix runs with `fail-fast: true`, a single Elm setup crash cancels every sibling language job in the same matrix and trips the `test-complete` gate. See #3066 for details.

## Suggested solutions

- Make the warmup retry-safe: wrap the setup in a retry loop with backoff.
- Serialize Elm invocations so nothing else touches `elm-stuff` while the compiler runs.
- Pre-build `elm-stuff` into the runner image or cache it, avoiding the `rm -rf` + rebuild race entirely.

## Interim policy

Per `CLAUDE.md` ("Known CI flakiness"), we accept this flake for now. When it happens we retry the failed jobs (`gh run rerun --failed`); a failure here only counts as real if it reproduces across retries or the PR actually touches Elm.

Contributor guide

Open the contributing guide

Research direction

Start with the fixture-setup command described in the issue and read the “Known CI flakiness” section of CLAUDE.md. Inspect the Elm fixture job entry point around `rm -rf elm-stuff && elm make Warmup.elm`, then validate the selected mitigation by rerunning affected fixture jobs and confirming setup completes without the lock/deadlock or spurious matrix cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.