fix(install): use releases api in powershell installer#25
Open
Shengming Liang (LiangShengming) wants to merge 1 commit into
Open
fix(install): use releases api in powershell installer#25Shengming Liang (LiangShengming) wants to merge 1 commit into
Shengming Liang (LiangShengming) wants to merge 1 commit into
Conversation
4633827 to
220407e
Compare
220407e to
e2818da
Compare
Collaborator
Author
|
Validation evidence for this PR at commit
|
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.
Pull Request
Summary
What:
Fix the Windows PowerShell installer latest-version lookup by reading
tag_namefrom the GitHub Releases API instead of parsing/releases/latestredirect headers.Why:
PowerShell 5.1 can misread the typed redirect response headers and fail before downloading the CLI. The API response gives us a stable JSON shape across supported PowerShell versions.
Test Plan
git diff --check upstream/feat/self-update-command..HEAD./scripts/testgh api repos/dedalus-labs/dedalus-cli/releases/latest --jq .tag_name->v0.4.0powershell 5.1 (windows-2022)passed withPSVersion 5.1.20348.4294,PSEdition Desktop, installer resolvedv0.4.0, installeddedalus.exe, anddedalus.exe --helpreported0.4.0.powershell 5.1 (windows-latest)passed withPSVersion 5.1.26100.32995,PSEdition Desktop, installer resolvedv0.4.0, installeddedalus.exe, anddedalus.exe --helpreported0.4.0.Repro / Showcase
For the installer bug,
Get-LatestVersionno longer depends on the PowerShell 5.1 redirectLocationheader shape. It now callshttps://api.github.com/repos/dedalus-labs/dedalus-cli/releases/latestwith aUser-Agentand readstag_namefrom JSON.Tests Added
Risk areas: