[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::JobArtifact
s, not Ci::Build
s.
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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Shinya Maeda