TLDR: Two jobs in the same workflow call the latest artifacts endpoint. The first gets the correct artifacts, the second gets an empty array.
I’m experiencing a similar issue, however in my case the trouble is that the api call to fetch the latest artifacts sometimes returns the expected data, and other times it is empty.
create job generates some dynamic text and stores it in a file, which is artifacted
list job calls the /api/v1.1/project/github/user/project/latest/artifacts endpoint and outputs the result
show job calls the same endpoint as list, but it stores the result in a file for later parsing
While the api call in list routinely outputs the expected response with a single artifact, the show job has always (thus far) received an empty array of artifacts.
We’re running into this issue as well. It seems to have started when we split our workflow into jobs and the job that produces the artifacts finishes before the others.
We’re looking at a workaround using https://circleci.com/api/v1.1/recent-builds but it would be nice to know if this can be solved another way, for example with an api argument to specify which job to get the artifacts from?