Repository navigation
ci(flatpak): move the image's installation off its lower layer - #144
Merged
Merged
Conversation
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.
Contributor
Author
|
Cross-review: Ready. Reviewer |
bketelsen
approved these changes
Nov 10, 2026
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.
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/flatpakin one of its layers.flatpak-builder --install-deps-from=flathubupdates 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 withoutredirect_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/flatpakinto the container's own layer, where every rename works.TestFlatpakJobMovesTheInstallationBeforeTheBuildrequires that step before the build step, with noif. One.memory/corrections.jsonlline records the lesson.#128, Race detector: this PR changes no code for #128. Both of its failures are fixed on
mainalready:rpc.shutdown = notesd: connection closed; want its result(andTestShutdownWithNoDataDirectory).kit/jsonrpc'sClient.Callcould pick the closed connection over a reply that had come. Fixed in lodge'skit/v0.3.1(frostyard/lodge@89966f2, withTestAReplyBeforeTheCloseReachesTheCall). frostnotes has usedkit v0.4.0since b191032.main, 2026-11-09):TestADeleteInterruptedBeforeTheRemovalWaitsForTheShare. The crashed notesd of the test ran on after its crash point. Fixed in test(syncer): hold a crashed notesd at its crash point until it stops #142 (10def79, 56c9ef6).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 getsrisk:high. It also touchesinternal/workflowcheck/workflows_test.go, which matchesinternal/{workflowcheck,repocheck}/**(L2).Why this is safe:
/var/lib/flatpakin that container's own layer. The runner, the checkout and the cache are not touched.publishjob and the tag steps do not change.flatpak-builderstill updates the same runtimes from Flathub, as before.Verification
make checkgreen (host).permissions: contents: read, and the checkout keepspersist-credentials: false.flatpak.yml,go test ./internal/workflowcheckfails:no step before the build re-creates /var/lib/flatpak in the container's layer.ghcr.io/flathub-infra/flatpak-github-actions@sha256:78d969b1…), run withpodman run --privileged. Its overlay mount hasredirect_dir=nofollow.flatpak --system update -y org.gnome.Sdk//51→Error: Failed to update org.gnome.Sdk: Invalid cross-device link, exit 1.f0bca3a9…. The copy of 3.8 GB takes 19 s.TestAReplyBeforeTheCloseReachesTheCallfails 20 of 20 runs with the fix reverted in a copy of kit v0.4.0. It passes 20 of 20 runs on kit v0.4.0.go test -race -count=300 -run '^(TestRPCShutdownStopsNotesdAfterItAnswers|TestShutdownWithNoDataDirectory)$' ./cmd/notesd ./cmd/notesctl→ ok, 0 failures.go test -race -count=200 -run '^TestADeleteInterruptedBeforeTheRemovalWaitsForTheShare$' ./internal/syncer→ ok, 0 failures.TestDoneClosesAfterDerivedContextsEnd.