Skip to content

[RUN AS-IF-FOSS] Fix 404 when downloading a non-archive artifact

What does this MR do?

This MR fixes a bug preventing the download of pipeline artifacts that do not have the archive file type. The download route assumes by default that it is downloading an archive artifact, and requires file_type param to download another type. That type was not being provided, and this MR adds it to the download URL before it is passed to the frontend.

Unfortunately, this is not a straightforward fix. In order to access the file type attribute, it was necessary to modify Pipeline#artifacts so that it returns Ci::JobArtifacts, not Ci::Builds.

Issue: #218582 (closed)

Screenshots

Here you can see the download working properly:

Screen_Recording_2020-05-21_at_7.10.01_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Shinya Maeda

Merge request reports