Repository navigation
Fix in-app update failure on releases published without an update package - #160
Merged
Merged
Conversation
A release tagged v0.2.00-beta.1a shipped with no Velopack .nupkg assets, so the in-app updater failed with "Could not find asset called 'WinContainers-0.2.00-beta.1a-beta-full.nupkg'". Two causes, both now guarded: - publish-release.ps1 selected assets by matching the version against file names. vpk normalizes 0.2.00-beta.1a to 0.2.0-beta.1a, so neither package matched and the filter silently published an uninstallable release. Asset selection is now driven by the assets.<channel>.json manifest vpk writes, and the run fails if the full package is absent, if a declared asset was not produced, or if an unlisted package, ZIP or EXE is left behind. - The tag regex allowed leading zeros. The updater derives the expected package name from the raw tag while vpk names files from the normalized version, so the tag must be normalized SemVer. Both the publish script and the contract test now reject leading zeros. test-release-contracts.ps1 additionally requires the full update package in the checksum manifest, and UpdateService translates Velopack's missing-asset failure into a message pointing at the manual installer download. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Problem
The in-app updater fails with:
Release
v0.2.00-beta.1awas published with no Velopack.nupkgassets at all — onlyassets.beta.json,releases.beta.json,RELEASES-beta, the portable ZIP,Setup.exeand the checksums manifest. No user could install that update in-app.Root cause
Two cooperating bugs:
The asset filter failed open.
scripts/publish-release.ps1selected release assets by matching the version against file names.vpknormalizes0.2.00-beta.1ato0.2.0-beta.1awhen it names its output, so^WinContainers-0.2.00-beta.1a(?:[-.]|$)matched nothing and the script published a release with zero update packages — without failing.The tag was not normalized SemVer. The updater derives the expected package name from the raw release tag (
0.2.00-beta.1a) whilevpknames the files from the normalized version (0.2.0-beta.1a). Those two names can never agree, so a tag likev0.2.00-*can only ever produce an uninstallable release.tools/test-release-contracts.ps1permitted leading zeros and never required a full package, so the broken release passed validation.Fix
scripts/publish-release.ps1assets.<channel>.jsonmanifest thatvpkwrites, which is the authoritative list of the names the updater needs.Fullpackage and asserts its name isWinContainers-<version>-<channel>-full.nupkg..nupkg/.zip/.exewould be left behind unpublished.tools/test-release-contracts.ps1minimumSupportedVersionandreleaseTag.src/WinContainers.App/UpdateService.csdocs/releases.mddocuments the tag and asset-selection contract.Verification
dotnet build src/WinContainers.App/WinContainers.App.csproj -c Debug— succeeds.dotnet test tests/WinContainers.Tests.Unit/...— 220 passed, 0 failed.v0.2.0-beta.1a,v0.1.54-beta.9d,v1.2.3; rejectsv0.2.00-beta.1a, a manifest with no full package, and duplicate names.v0.2.0-beta.1a,v1.2.3; rejectsv0.2.00-beta.1a,v1.02.3,v1.2.Follow-up
Delete release/tag
v0.2.00-beta.1aand re-publish asv0.2.0-beta.1b— a strictly greater version, so clients on0.2.00-beta.1acan update in-app rather than seeing the normalized tag as the same version.