Skip to content

Fix artifact download by task key endpoint to match correct server route#436

Merged
robinaugh merged 1 commit intomainfrom
jason/fix-artifact-download-by-task-key-route
Mar 19, 2026
Merged

Fix artifact download by task key endpoint to match correct server route#436
robinaugh merged 1 commit intomainfrom
jason/fix-artifact-download-by-task-key-route

Conversation

@robinaugh
Copy link
Contributor

Background

Companion to #435, which fixed the same issue for GetArtifactDownloadRequest.

Problem

rwx artifacts download <run-id> <key> --task <task-key> was always returning 404. GetArtifactDownloadRequestByTaskKey was calling GET /mint/api/artifact_downloads/<key>?run_id=<id>&task_key=<key>, which doesn't match any route — Rails returned a routing-level 404 before reaching the controller.

Solution

  • Changed GetArtifactDownloadRequestByTaskKey to call GET /mint/api/artifact_download?run_id=<id>&task_key=<key>&key=<artifact-key>, matching the artifact_download_by_key route (routes.rb line 310)
  • Added a unit test for GetArtifactDownloadRequestByTaskKey (none previously existed)

Further confirmation needed

  • Verify rwx artifacts download <run-id> <key> --task <task-key> works end-to-end

Previously called /mint/api/artifact_downloads/:key?run_id=...&task_key=... 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 19, 2026
@robinaugh robinaugh marked this pull request as ready for review March 19, 2026 00:08
@robinaugh robinaugh merged commit d9fe22e into main Mar 19, 2026
1 check passed
@robinaugh robinaugh deleted the jason/fix-artifact-download-by-task-key-route branch March 19, 2026 00:08
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