Skip to content

ci(lint): pin the SwiftLint job to ubuntu-24.04 while SwiftLint links libxml2.so.2 - #1117

Merged
wei18 merged 3 commits into
mainfrom
session/ci-swiftlint-ubuntu2404-1116
Nov 13, 2026
Merged

wei18 merged 3 commits into
mainfrom
session/ci-swiftlint-ubuntu2404-1116

Conversation

@wei18

@wei18 wei18 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #1116

What

Pins the swift-lint job (and only that job) to ubuntu-24.04. The ubuntu-latest (26.04) image build of 2026-11-01 removed libxml2.so.2; every released SwiftLint Linux binary links it (realm/SwiftLint#6966), so the job failed before linting on PR #1115 and will on every PR until upstream ships realm/SwiftLint#6967.

Options weighed (details in #1116)

  • apt install libxml2 on 26.04 → provides only libxml2.so.16, no fix.
  • SwiftLint bump → no released Linux binary links .so.16 yet (#6967 open); swiftlint-static lacks the SourceKit rules.
  • ubuntu-24.04 pin (taken) → upstream's own workaround; exit condition written next to the pin: bump .mise.toml and return to ubuntu-latest when #6967 is released.
  • macos-latest → ~10× minutes, and mise install on macOS would also hit the currently-404ing aqua:tuist/tuist@4 (seen locally in a fresh worktree; separate problem).

Proof

A YAML-only PR makes the job skip the lint step ("No Swift files changed"), which proves nothing, so a temporary one-line Swift touch was pushed and reverted: that run executed swiftlint 0.57.1 on Image: ubuntu-24.04 against Packages/GameShellKit/Tests/GameShellUITests/RegularBoardContainerTests.swift and passed — https://github.com/wei18/Sudoku/actions/runs/42824234021/job/129857196153 (the failing 26.04 run for comparison: https://github.com/wei18/Sudoku/actions/runs/42821456808/job/129847739169). The squash of this PR is the YAML change only. A local lint pass proves nothing here (the failure lives in the runner image). No other job changes.

🤖 Generated with Claude Code

wei18 and others added 2 commits November 10, 2026 21:22
… libxml2.so.2

The ubuntu-26.04 runner image (ubuntu-latest) dropped libxml2.so.2 in its
2026-11-01 build, and every released SwiftLint Linux binary (0.57 through
0.65.1) dynamically links it, so `Lint / SwiftLint (changed files)` dies
before linting a single file on every PR. Neither an apt install (26.04 ships
only libxml2.so.16) nor a SwiftLint bump (realm/SwiftLint#6967, binaries
built against .so.16, is still unreleased) can fix it today; upstream's own
workaround is ubuntu-24.04, which still ships libxml2.so.2.

Scoped to the swift-lint job only; the exit condition (bump the pin and go
back to ubuntu-latest once #6967 ships) is recorded next to the pin.

Closes #1116

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… (probe, reverted next)

The swift-lint job only runs swiftlint when the PR changes a Swift file;
the pin alone would be "proven" by a skipped step. This commit touches one
test file so the job lints it on the 24.04 image. Reverted immediately after
the run; the run URL is the evidence on #1116.

part of #1116

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@wei18

wei18 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

PM merge record, head 257cb128. CI-only, 1 line plus a comment, verified by me from the ref; no code review dispatched (well under the 50-LOC threshold and not a sensitive path).

Why it was urgent: the SwiftLint (changed files) check was failing on PR #1115 with libxml2.so.2: cannot open shared object file. I confirmed it was not that branch: it touches no .github or mise file, and no branch had run CI since 2026-10-28, so the runner image changed under us. Every future PR would have hit the same wall.

Options were weighed with evidence, and the evidence overrode my own steer. I had suggested preferring the library install; the session tested it and found 26.04 ships only libxml2.so.16, which the released SwiftLint binaries do not link. A version bump was also ruled out (no released Linux binary links .so.16 yet; the static build drops the SourceKit rules). The pin to ubuntu-24.04 is upstream's own workaround.

The exit condition is written next to the pin, not just in the PR: when the upstream fix ships, bump swiftlint in .mise.toml and return the job to ubuntu-latest. A pin without that line is how a temporary workaround becomes permanent.

Proof is the green check on this PR, since the failure lives in the runner image and a local lint pass proves nothing. Only the swift-lint job changed. CI 7/7.

The probe run proved swiftlint 0.57.1 executes on the ubuntu-24.04 image
with a real Swift file in the change set:
https://github.com/wei18/Sudoku/actions/runs/42824234021/job/129857196153

part of #1116

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@wei18

wei18 commented Nov 13, 2026

Copy link
Copy Markdown
Owner Author

Merging at head b2cd19ef (the probe commit that forced the lint step to execute is reverted, so the squashed diff is lint.yml only — verified from the ref). All 7 checks green, merge state CLEAN; the earlier copilot_code_review block has cleared.

The merge record above still applies.

@wei18
wei18 merged commit dc447bc into main Nov 13, 2026
7 checks passed
@wei18
wei18 deleted the session/ci-swiftlint-ubuntu2404-1116 branch November 13, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(lint): SwiftLint job fails on ubuntu-26.04 image 20261101 — libxml2.so.2 missing (realm/SwiftLint#6966)

1 participant