Incorrect snap download URL
Metadata
Current evaluation
Fixed Snap download URL recognition by using /api/v1/snaps/download instead of the obsolete /v2 endpoint in PR #176 (commit 576564b).
Resolution: closed resolved
Reason: PR #176 was merged and commit 576564b updated the Snap inspector to recognize valid download URLs, resolving the reported URL mismatch.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
Currently, the snap package URL is defined as
```reSnapPackage = regexp.MustCompile(`^https://api.snapcraft.io:443/v2/snaps/download/([A-Za-z0-9]+)_([0-9]+)\.snap\?`)```.
This doesn't exist in the Store, and I think it should be updated to match a URL like `https://api.snapcraft.io/api/v1/snaps/download/99T7MUlRhtI3U0QFgl5mXXESAiSwt776_16928.snap`.
It's also worth noting that currently the snap download URL always redirects to one of the snapcraftcontent CDNs (matching the `reSnapPackageAlt` URL).
### To Reproduce
Working snap download (redirects to CDN)
`curl https://api.snapcraft.io/api/v1/snaps/download/99T7MUlRhtI3U0QFgl5mXXESAiSwt776_16928.snap`
Using the current URL (404s)
`curl https://api.snapcraft.io/v2/snaps/download/99T7MUlRhtI3U0QFgl5mXXESAiSwt776_16928.snap`
### Relevant log output
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed Snap download URL recognition by using /api/v1/snaps/download instead of the obsolete /v2 endpoint in PR #176 (commit 576564b). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed Snap download URL recognition by switching from /v2/snaps/download to /api/v1/snaps/download in PR #176 (commit 576564b). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The report was logged as internal Jira ticket CRAFT-3151, but no code fix or follow-up was provided. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/fetch-service#176
(confidence 100%)
Merged PR #176 implemented the fix in commit 576564b.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #176 fix(inspectors/snap): update valid urls | fetch-service | merged | Merged PR #176 fixed Snap download URL recognition in commit 576564b, resolving #155 by accepting the /api/v1/snaps/download URL. |