Repository navigation
Serve WSLC GA releases and stop offering previews to users - #159
Merged
Merged
Conversation
Onboarding hardcoded the 2.9.4 preview MSI, so new users were nine builds behind and on a prerelease rather than the 3.0.1 GA build. Resolve the latest generally available release through WslcUpdateService instead, and filter prerelease releases out of the update check so the preview ring is never offered. Also anchor the MSI asset match on the build number: the previous prefix check let version 3.0.1 match a 3.0.10 asset and pair it with the wrong URL and hash. 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.
Why
WSLC 3.0.1 is the first generally available build of the WSL Containers runtime. Two things kept the app from moving users onto it:
OnboardingViewModel.InstallWslcAsync()hardcoded thewsl.2.9.4.0.x64.msiasset and its SHA256, so every new user installed a nine-builds-behind prerelease instead of GA 3.0.1.WslcUpdateServicepicked the highest version on the releases page without checking theprereleaseflag, so the moment the 3.1.0 preview ring opens it would offer previews to users.For context, the machine this was developed on was itself running 2.9.13.0, which is also a preview.
What changed
InstallWslcAsync()now asksWslcUpdateServicefor the latest GA release and builds the same elevated-PowerShell script from the returned URL, asset filename, and SHA256. A lookup failure or an empty result is surfaced as a logged error instead of launching a script with missing values. The elevated-temp cleanup, SHA verification, and%LOCALAPPDATA%\WinContainers\wsl-install.logbehavior are unchanged."prerelease": trueare skipped in the shared release scan.StartsWith($"wsl.{version}")check let version3.0.1also matchwsl.3.0.10.0.x64.msi, which would have produced a version/URL/SHA triple that does not agree.IsX64MsiAssetnow requires the version prefix, a numeric build component, and the.x64.msisuffix.WslcUpdateInfogained aFileNamefield so callers stop reconstructing asset names.Notes
wslccommand this app issues is unchanged, and there are no CLI surface or JSON output changes between 2.9.13 and 3.0.1.WslcDriverandWslcCommandsare untouched. Worth noting for review: 3.0.1 does add STDIN support through the SDK and impersonates the caller before filesystem operations, both of which are favorable for the host-side file identity this app relies on, but neither required a code change here.WinContainers.Appis WinUI/net10.0-windows-targeted and is not referenced by the test project. This matches the existing convention inRuntimeContractTests.cs. I confirmed they are not vacuous by reverting the service to the old prefix match and no-prerelease-filter and watching the test fail.Testing
dotnet build WinContainers.slnx -c Debug --nologo -v q(0 warnings, 0 errors)dotnet test tests/WinContainers.Tests.Unit/WinContainers.Tests.Unit.csproj -c Debug --nologo -v q(220 passed, 0 failed)WslcUpdateService_ShouldIgnorePrereleasesAndMatchAssetsExactlyfails, then restoredIsX64MsiAssetagainst 7 cases, including the3.0.1vs3.0.10collision, wrong architecture suffixes, and a trailing-suffix spoofNot covered: no end-to-end run of the elevated MSI install against a machine without
wslc, since that requires a UAC prompt and a clean host.