From 4799f06bd246c2c38e8d2dd33f8e15710994fbca Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 16 Oct 2026 21:00:26 -0700 Subject: [PATCH] fix(release): recreate refs/remotes dropped by git on the Flatpak remote publish (#966) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(release): recreate refs/remotes dropped by git on the Flatpak remote publish The first real remote publish (v0.18.3) failed at 'flatpak build-update-repo --generate-static-deltas' with 'opendir(refs/remotes): No such file or directory'. ostree init creates refs/remotes empty, git does not track empty dirs, and the site/repo checked back out of gh-pages therefore lacks it — while delta generation opens that dir unconditionally. mkdir -p it (and refs/mirrors) after the copy. Also name the Snap Store review-queue blockage in its publish error, so the fix (reject the stale upload on the dashboard, re-run) surfaces on the job page. * test(release): pin the refs/remotes mkdir before build-update-repo --------- Co-authored-by: Jatin K Malik --- .github/workflows/release.yml | 9 +++++++++ tests/test_release_integrity.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf1e73b..a0312aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -684,6 +684,11 @@ jobs: mkdir -p "$repo" ostree --repo="$repo" init --mode=archive-z2 fi + # git drops empty directories: a checked-out site/repo lacks + # refs/remotes and refs/mirrors, and `build-update-repo + # --generate-static-deltas` aborts with + # "opendir(refs/remotes): No such file or directory" without them. + mkdir -p "$repo/refs/remotes" "$repo/refs/mirrors" ls -la dist/*.flatpak for bundle in dist/*.flatpak; do flatpak build-import-bundle \ @@ -1092,6 +1097,10 @@ jobs: echo "::warning::Snap Store queued a human review (allow-installation). The .snap is on the GitHub Release." exit 0 fi + if grep -F -q "Waiting for previous upload(s)" "$log"; then + echo "::error::Snap Store publish failed: an older upload is still in the review queue. Reject and remove it at https://dashboard.snapcraft.io/ (the upload page lists it), then re-run this job." + exit "$status" + fi echo "::error::Snap Store publish failed (exit $status) for a reason other than allow-installation review." exit "$status" diff --git a/tests/test_release_integrity.py b/tests/test_release_integrity.py index 11553b3..50ec83a 100644 --- a/tests/test_release_integrity.py +++ b/tests/test_release_integrity.py @@ -292,3 +292,17 @@ def test_the_remote_publish_is_stable_gated_and_keeps_history(): "continue-on-error" not in block ), "a tolerated checkout failure falls through to the empty-repo path" assert ".flatpakref" in block, "no app ref is written for one-command installs" + + +def test_the_remote_publish_recreates_dirs_git_drops() -> None: + """git does not track empty directories, so a site/repo checked out from + gh-pages comes back without refs/remotes or refs/mirrors — and + `flatpak build-update-repo --generate-static-deltas` aborts on + `opendir(refs/remotes): No such file or directory` when it enumerates refs + for deltas. v0.18.3 hit exactly this on the first real remote publish.""" + block = _jobs()["publish-flatpak-remote"] + mkdir = 'mkdir -p "$repo/refs/remotes" "$repo/refs/mirrors"' + assert mkdir in block, "the copied-back repo must re-create the ref dirs git dropped" + assert block.index(mkdir) < block.index( + "flatpak build-update-repo" + ), "the dirs must exist before build-update-repo enumerates refs"