Add fallback URL for Testkube CLI download when release tag format doesn't match#16
Open
Add fallback URL for Testkube CLI download when release tag format doesn't match#16
Conversation
Co-authored-by: olensmar <1917063+olensmar@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix setup-testkube action to download CLI versions without v prefix
Add fallback URL for Testkube CLI download when release tag format doesn't match
Mar 18, 2026
Member
|
@greptile |
Greptile SummaryThis PR fixes a real production bug where the action was constructing GitHub release download URLs with a What's good:
Minor observation (non-blocking):
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant A as Action (index.ts)
participant SC as semver.lt()
participant GH as GitHub Releases CDN
A->>SC: lt(encodedVersion, "2.4.0")
SC-->>A: isLegacyVersion (true/false)
A->>A: Build primaryArtifactUrl<br/>(v-prefix if legacy, no-prefix if modern)
A->>A: Build fallbackArtifactUrl<br/>(opposite of primary)
A->>GH: downloadTool(primaryArtifactUrl)
alt Primary succeeds
GH-->>A: artifact binary
else HTTP 404
GH-->>A: HTTPError (404)
A->>A: log "falling back to fallbackArtifactUrl"
A->>GH: downloadTool(fallbackArtifactUrl)
alt Fallback succeeds
GH-->>A: artifact binary
else Fallback fails
GH-->>A: Error (propagated to caller)
end
else Other HTTP error
GH-->>A: HTTPError (non-404) — rethrown
end
A->>A: extractTar → cacheFile → addPath
Last reviewed commit: "Fix download URL fal..." |
vsukhin
approved these changes
Mar 18, 2026
|
Any update on this @olensmar? |
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.
Testkube CLI releases dropped the
vprefix in tag names starting at v2.4.0, causing HTTP 404 errors when the action tried to download newer CLI versions with the old URL format.Changes
src/index.ts: Compute both a primary URL (chosen via semver comparison against2.4.0) and a fallback URL (oppositev-prefix variant). WrapdownloadToolin a try/catch; onHTTPErrorwith status 404, log and retry with the fallback URL. ImportHTTPErrorfrom@actions/tool-cachefor proper type-safe error handling instead of string-matching.dist/index.js: Rebuilt from updated source.This makes the action resilient to the existing 2.4.0 format change and any future tag format changes.
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.