ci: pin Backend job to ubuntu-latest because arc-runner lacks gcc#68
Merged
Conversation
Follow-up to 3edb200. The previous fix correctly added CGO_ENABLED=1 so `go test -race` could initialize CGO, but it tripped over a second problem on the arc-runner image: # runtime/cgo cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH`n Arc-runner's container image does not include build-essential / gcc, and arc-runners do not normally allow apt-get installs at step time. The deterministic fix is to pin the Backend job to ubuntu-latest, which ships gcc + clang and where setup-go@v5 enables CGO by default. Frontend + Docker jobs still ride the arc-runner default β they don't need CGO. Re-pin Backend to arc-runner once its image grows a compiler. No functional change to other jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Pins the Backend CI job to ubuntu-latest to work around the self-hosted arc-runner image lacking a C compiler, which is required by go test -race via CGO.
Changes:
- Replace
runs-on: ${{ inputs.runner || 'arc-runner' }}withruns-on: ubuntu-latestfor the Backend job and document the reason. - Update the comments around
CGO_ENABLED: 1in the Test and second (race) steps to reflect the new runner.
Comment on lines
+30
to
+36
| # Pinned to ubuntu-latest (not the arc-runner default) because `go test | ||
| # -race` requires CGO, which requires a C compiler at runtime, and the | ||
| # self-hosted arc-runner image does not currently ship one (`cgo: C | ||
| # compiler "gcc" not found`). Frontend + Docker jobs can still ride | ||
| # arc-runner β they do not need CGO. Re-pin to arc-runner once its | ||
| # image includes build-essential / gcc. | ||
| runs-on: ubuntu-latest |
β¦in to ubuntu-latest)
The Backend job now passes on ubuntu-latest (see prior commit). The
Frontend job was also failing on the arc-runner, with two distinct
root causes β both pre-existing latent issues that only became visible
once the upstream Test step got past the gcc problem and the suite
actually started running:
1. **45 "Test timed out in 5000ms" failures.** The arc-runner is
resource-starved enough that vitest's default 5s testTimeout is
below the noise floor for tests that mount QueryClient + Router +
lazy-loaded chart components. Bump `testTimeout` and `hookTimeout`n in `vite.config.ts` to 30s β generous enough to absorb CI jitter
while still catching genuinely runaway tests. Local full-suite
runtime is unchanged (~80s end-to-end).
2. **~10 "ReferenceError: ResizeObserver is not defined" failures.**
jsdom doesn't ship `ResizeObserver`. A couple of individual test
files installed ad-hoc `vi.stubGlobal('ResizeObserver', β¦)` shims,
but as soon as ANY non-stubbing test imports a chart (Recharts
ResponsiveContainer) or a grid (react-grid-layout) component
transitively, it crashes. Install a global polyfill in
`src/test-setup.ts`, matching what we already do for
`IntersectionObserver` and `EventSource`. Removes per-test
boilerplate that lived in `SmallMultiplesChart.test.tsx` and
`DashboardGrid.mobile.test.tsx` (those files keep their local
stubs β the global polyfill just makes them no-ops).
3. **Pin Frontend job to ubuntu-latest** for the same reason as
Backend: even with the 30s timeout, the arc-runner's throughput is
inconsistent enough that we trade flakes for wall-clock and burnt
minutes. Re-pin to arc-runner once the runner image gets the
bandwidth budget.
Verified locally:
- `npx tsc --noEmit` clean
- `npm test -- --run` -> 397 files / 4137 tests / 0 failures
- `npm run lint` (24 audit stages) clean
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Same defensive runner-pin pattern as the backend and frontend jobs. arc-runner has shown three independent failure modes on this branch already (gcc missing, frontend test timeouts, intermittent docker export-worker stalls), and lighthouse-ci-action additionally needs Chrome which arc-runner does not ship. Verified locally: - docker build all 3 images: api (2.5min) export-worker (3min) notification (33s) - go build + golangci-lint clean - tsc + lint + build + vitest 397/4137 all pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment on lines
+183
to
+189
| # Pinned to ubuntu-latest to match the Backend job: the arc-runner is | ||
| # too resource-starved for vitest's default 5s testTimeout (45+ tests | ||
| # routinely time out under load even though the same suite finishes | ||
| # in ~80s locally and on ubuntu-latest). Re-pin to arc-runner once | ||
| # the runner image has the bandwidth budget for jsdom + chart-heavy | ||
| # component trees. | ||
| runs-on: ubuntu-latest |
| # compiler "gcc" not found`). Frontend + Docker jobs can still ride | ||
| # arc-runner β they do not need CGO. Re-pin to arc-runner once its | ||
| # image includes build-essential / gcc. | ||
| runs-on: ubuntu-latest |
Comment on lines
+147
to
+148
| testTimeout: 30000, | ||
| hookTimeout: 30000, |
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.
Follow-up to #67. The merged PR correctly added
CGO_ENABLED=1sogo test -racecould initialize CGO, but it tripped over a second arc-runner constraint: