Skip to content

Fix artifact download endpoint to match correct server route#435

Merged
robinaugh merged 1 commit intomainfrom
jason/fix-artifact-download-route
Mar 18, 2026
Merged

Fix artifact download endpoint to match correct server route#435
robinaugh merged 1 commit intomainfrom
jason/fix-artifact-download-route

Conversation

@robinaugh
Copy link
Contributor

@robinaugh robinaugh commented Mar 18, 2026

Problem

rwx artifacts download <task-id> <key> was always returning 404. The CLI was calling GET /mint/api/artifact_downloads/<key>?task_id=<id>, which doesn't match any route in the server. Rails was returning a routing-level 404 before the request ever reached the controller.

Solution

  • Changed GetArtifactDownloadRequest to call GET /mint/api/artifact_download?task_id=<id>&key=<key>, which matches the artifact_download_by_key route (routes.rb line 310)
  • Updated the four affected unit tests to assert the corrected path and key query param

Further confirmation needed

  • Verify rwx artifacts download works end-to-end against a real task with artifacts

Previously called /mint/api/artifact_downloads/:key?task_id=... which didn't
match any route. The correct endpoint is /mint/api/artifact_download with key
passed as a query param.
@robinaugh robinaugh self-assigned this Mar 18, 2026
@robinaugh robinaugh marked this pull request as ready for review March 18, 2026 23:56
@robinaugh robinaugh merged commit 0cfa413 into main Mar 18, 2026
1 check passed
@robinaugh robinaugh deleted the jason/fix-artifact-download-route branch March 18, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants