fix(snap): unfreeze Snap Store at v1.13.15 + permanent bump fix#83
Merged
Conversation
The Snap Store was frozen at v1.13.9 since the v1.13.10 release because snap/snapcraft.yaml had a hardcoded version that the bump script did not touch. Revisions 25-29 were created on the Snap Store with the correct binary but the version string visible to users remained 1.13.9. This commit restores parity for v1.13.15. The next commit prevents this from recurring by making the bump script resilient to drift between app/constants.py and the other packaging files. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Root cause of the v1.13.9 Snap Store freeze: the bump script in release.yml derives OLD from app/constants.py and uses re.escape(OLD) to match every other packaging file. Between v1.13.9 and v1.13.13, app/constants.py was bumped manually without running release.yml, so the other packaging files (snap, rpm, winget, aur-bin, flatpak) drifted out of sync. From v1.13.13 onward the OLD value from constants.py no longer matched the strings in those files, and re.sub silently did nothing — the workflow reported "unchanged" and proceeded to tag the release. Fix: 1. Packaging-file regexes now match any semver (\d+\.\d+\.\d+) instead of the escaped OLD value, so drift no longer hides the substitution. 2. Each target is marked required/optional. If a required file produces no match AND is not already at NEW, the workflow fails loudly instead of pretending success. 3. Idempotency: re-running with NEW == OLD is a no-op, not a failure. 4. Regression tests in tests/test_release_bump_script.py extract the inline script from release.yml and exercise the exact failure mode (constants.py at 1.13.14, snap stuck at 1.13.9) plus an assertion that snap/snapcraft.yaml in the repo always matches APP_VERSION. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
The Snap Store has been silently frozen at v1.13.9 since the v1.13.10 release. Users running
snap listseepdfapps 1.13.9even aftersnap refresh, while the project is on v1.13.15.Root cause
snap/snapcraft.yaml:4hadversion: '1.13.9'hardcoded. The bump pipeline in.github/workflows/release.ymldoes includesnap/snapcraft.yamlin its target list, but the inline Python script derivesOLDdynamically fromapp/constants.pyand builds every regex withre.escape(OLD).Between v1.13.9 and v1.13.13,
app/constants.pywas bumped manually (commits 96ad51c, 3883dc9, 1e19f7a — each touching onlyapp/constants.py). The other packaging files (snap, rpm, winget, aur-bin, flatpak) drifted out of sync. From v1.13.13 onward, whenrelease.ymlfinally ran,OLDwas1.13.12/1.13.14and the snap still said1.13.9— sore.submatched nothing and silently did nothing. The workflow printedunchanged: snap/snapcraft.yamland proceeded to tag the release.Every publish since v1.13.10 (revisions 25-29) uploaded a snap to the Store but with the frozen version string
1.13.9. CI reported success becausesnapcraft uploaddoes not fail when the version field mismatches the binary.Fix
snap/snapcraft.yamlnow saysversion: '1.13.15'..github/workflows/release.yml, packaging-file regexes match any semver (\d+\.\d+\.\d+) instead of the escapedOLDvalue, so drift no longer hides the substitution. Each target is marked required/optional; if a required file produces no match and is not already atNEW, the workflow fails loudly. Re-running withNEW == OLDis now an idempotent no-op.tests/test_release_bump_script.pyextract the inline script fromrelease.ymland exercise the exact failure mode (constants.py at 1.13.14, snap stuck at 1.13.9). Includes a belt-and-braces check thatsnap/snapcraft.yamlin the repo always matchesAPP_VERSION.Other stale files (out of scope for this PR)
Audit of
snap/ rpm/ flatpak/ aur/ winget/ debian/ msix/shows the same drift hit several files. The permanent fix above will repair all of them on the next release bump, but you may want a targeted follow-up:rpm/pdfapps.spec—1.13.9winget/nelsonduarte.PDFApps.installer.yaml—1.13.9winget/nelsonduarte.PDFApps.locale.en-US.yaml—1.13.9winget/nelsonduarte.PDFApps.yaml—1.13.9aur/pdfapps/PKGBUILDand.SRCINFO—1.13.9aur/pdfapps-bin/PKGBUILDand.SRCINFO—1.13.10flatpak/io.github.nelsonduarte.PDFApps.yml—1.13.9(already caught bytests/test_pdfapps.py::TestAuditRegressions::test_flatpak_manifest_tag_is_current, which currently fails onmainfor the same reason)msix/generate_listing_csv.py— release notes hardcoded to1.13.9(likely intentional per-release; verify)Recovery procedure (post-merge)
After merge, trigger
publish.ymlmanually withversion: 1.13.15:The snap job will rebuild and re-upload as revision 30 with the correct
1.13.15string.ETA: ~8-10 min for the workflow + ~15-30 min for Snap Store CDN propagation. Users running
snap refreshafter that should see v1.13.15.Validation
python -c "import yaml; yaml.safe_load(open('snap/snapcraft.yaml'))"-> OK, version 1.13.15.tests/test_release_bump_script.py(4 tests, all passing).pytest tests/-> 199 passed, 1 skipped, 1 pre-existing failure (test_flatpak_manifest_tag_is_current— same root cause, listed above as out-of-scope cleanup).APP_VERSIONbump in this PR.