Skip to content

ci: pin Backend job to ubuntu-latest because arc-runner lacks gcc#68

Merged
atulmgupta merged 3 commits into
mainfrom
fix/ci-arc-runner-needs-gcc
May 19, 2026
Merged

ci: pin Backend job to ubuntu-latest because arc-runner lacks gcc#68
atulmgupta merged 3 commits into
mainfrom
fix/ci-arc-runner-needs-gcc

Conversation

@atulmgupta
Copy link
Copy Markdown
Contributor

Follow-up to #67. The merged PR correctly added CGO_ENABLED=1 so go test -race could initialize CGO, but it tripped over a second arc-runner constraint:

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 the runner does not allow `apt-get install` 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.

Verified by inspecting the failing CI run on commit `e7b4cd614` (PR #67 / main right now) β€” the only failure is the gcc-not-found error in the Test step, which this PR fixes.

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>
Copilot AI review requested due to automatic review settings May 18, 2026 20:02
@github-actions github-actions Bot added the ci label May 18, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' }} with runs-on: ubuntu-latest for the Backend job and document the reason.
  • Update the comments around CGO_ENABLED: 1 in the Test and second (race) steps to reflect the new runner.

Comment thread .github/workflows/ci.yml
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>
Copilot AI review requested due to automatic review settings May 18, 2026 21:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ci.yml
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
Comment thread .github/workflows/ci.yml
# 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 thread web/vite.config.ts
Comment on lines +147 to +148
testTimeout: 30000,
hookTimeout: 30000,
@atulmgupta atulmgupta merged commit b7235b7 into main May 19, 2026
8 of 11 checks passed
@atulmgupta atulmgupta deleted the fix/ci-arc-runner-needs-gcc branch May 19, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants