Artifacts archive downloaded via API cannot be extracted
Summary
Artifacts generated by the package
job of this pipeline (Internal) are returning 404 via the API with the following command:
curl -L -o artifacts-api.zip -H "PRIVATE-TOKEN: <token>" "https://gitlab.com/api/v4/projects/4619402/jobs/artifacts/test1/download?job=package"
An archive is downloaded, but it only contains the error text.
$ file artifacts-api.zip
artifacts-api.zip: ASCII text, with no line terminators
$ cat artifacts-api.zip
{"message":"404 Not found"}
Downloading the artifacts archive for this same pipeline via the UI produces an archive that can be extracted without issue.
Steps to reproduce
- Via the API, download the latest artifacts archive generated by the
package
job from this pipeline (Internal). - Observe via the terminal that the download was apparently successful.
- Attempt to extract the downloaded archive.
Example Project
So far this has only been replicated on one project, owned by the reporting customer.
What is the current bug behavior?
The artifacts archive for the package
job cannot be downloaded via the API. When this is attempted a text file in the form of a zip archive is produced instead that simply contains 404
.
What is the expected correct behavior?
When downloaded via the API, the archive that is produced should actually contain the job artifacts.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com: 11.11.0-ee
ZD: https://gitlab.zendesk.com/agent/tickets/119028 (Internal)
/cc @brendan