Skip to content

ci(flatpak): move the image's installation off its lower layer - #144

Merged
bketelsen merged 1 commit into
mainfrom
fix/flatpak-overlay-exdev
Nov 10, 2026
Merged

bketelsen merged 1 commit into
mainfrom
fix/flatpak-overlay-exdev

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the 2 flaky CI jobs.

#129, Flatpak (build and test): both failed attempts stopped at Error: Failed to update org.gnome.Sdk: Invalid cross-device link (run 41817714447, run 41775715654). The job's image installs the GNOME SDK and Platform in /var/lib/flatpak in one of its layers. flatpak-builder --install-deps-from=flathub updates them in place on every run, because the image is pinned and Flathub has newer commits, and the update renames directories of the installation. On an overlayfs mounted without redirect_dir=on, a rename of a directory from a lower layer fails with EXDEV (overlayfs, Renaming directories). Both failed attempts ran on AWS-hosted runners. The 40 passing runs that I sampled ran on Azure-hosted runners, where the same update works.

A new step before the build copies /var/lib/flatpak into the container's own layer, where every rename works. TestFlatpakJobMovesTheInstallationBeforeTheBuild requires that step before the build step, with no if. One .memory/corrections.jsonl line records the lesson.

#128, Race detector: this PR changes no code for #128. Both of its failures are fixed on main already:

The repeat runs below show both flakes gone at this head.

Fixes #129.
Closes #128.

Risk tier

Risk tier: 3. The PR touches .github/workflows/flatpak.yml, which matches .github/workflows/** (L2) and .github/workflows/{release,flatpak}.yml (L1), so it gets risk:high. It also touches internal/workflowcheck/workflows_test.go, which matches internal/{workflowcheck,repocheck}/** (L2).

Why this is safe:

  • The new step runs inside the job's privileged build container only. It copies, removes and renames /var/lib/flatpak in that container's own layer. The runner, the checkout and the cache are not touched.
  • It uses no secret, no token, no action and no new permission. The publish job and the tag steps do not change.
  • The image digest and the runtimes do not change. flatpak-builder still updates the same runtimes from Flathub, as before.
  • The workflowcheck change only adds a test.

Verification

The Flatpak job failed now and then with "Failed to update
org.gnome.Sdk: Invalid cross-device link". The job's image installs the
GNOME SDK and Platform in /var/lib/flatpak in one of its layers, and
flatpak-builder (--install-deps-from=flathub) updates them in place,
which renames directories of the installation. On an overlayfs mounted
without redirect_dir=on, a rename of a directory from a lower layer
fails with EXDEV
(https://docs.kernel.org/filesystems/overlayfs.html#renaming-directories).
Both failed attempts ran on AWS-hosted runners; the passing runs ran on
Azure-hosted ones.

A step before the build now copies /var/lib/flatpak into the
container's own layer, where every rename works. In the same image under
podman (overlay with redirect_dir=nofollow), `flatpak update
org.gnome.Sdk//51` failed with EXDEV before the copy and succeeded after
it; the copy of 3.8 GB took 19 s.

TestFlatpakJobMovesTheInstallationBeforeTheBuild requires the step
before the build and on every event; it fails without the step.

Fixes #129.
@github-actions github-actions Bot added level:L1 Read every line risk:high Touches a path in .github/risk-paths.json labels Nov 10, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review: Ready. Reviewer openai/gpt-6.1-sol; coder deepseek/deepseek-flash. Base 15885fc9389cb9e4294c302522db85a6fd02edc7, head 123e76a8267694c20a2546683469aaad924e18cb. Blocking: none. Findings: none. Limit noted: the copy adds about 3.8 GB to the container's layer. The Flatpak job of this head passed with it, so the runner had enough disk space for the full build.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 10, 2026
@bketelsen
bketelsen merged commit 1d01c8c into main Nov 10, 2026
12 checks passed
@bketelsen
bketelsen deleted the fix/flatpak-overlay-exdev branch November 10, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L1 Read every line ready-for-human Reviewed, CI green: ready for Brian to review and merge risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky: Build and test (flatpak.yml / Flatpak (build and test)) flaky: Run go test -race -timeout 25m -run '^Test[^I]' ./... (ci.yml / Race detector)

2 participants