Starting around March 17th at midnight UTC, I noticed some issues/inconsistencies when fetching build artifacts within a public project. Take for example https://app.circleci.com/pipelines/github/crystal-lang/crystal/11514/workflows/ec8923f6-0c3a-4da4-b28f-1dee01e0d29b/jobs/75119/steps. The workflow and job were both successful, however when looking at the artifacts tabs, it has an error: Error: [Network Error] Failed to fetch.
When trying to fetch the artifacts via the API via https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75119/artifacts I get a Build not found error, even tho visiting https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75119 shows that the build exists and was successful. However I do get the artifacts back when using the V2 API https://circleci.com/api/v2/project/github/crystal-lang/crystal/75119/artifacts, but not in all cases. for example when using curl (or an incognito window) both of them respond with Bad request.
$ curl https://circleci.com/api/v2/project/github/crystal-lang/crystal/75119/artifacts
{
"message": "Bad request."
}
$ curl https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75119/artifacts
{
"message": "Bad request."
}
Additionally, you can get the V2 API to return the data in an incognito window by:
- Open https://circleci.com/api/v2/project/github/crystal-lang/crystal/75119/artifacts in incognito window and see you get a
Bad request. - In another tab in the same window open https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75119
- Refresh the first tab and notice you now get the artifacts back
I also did validate that other public projects have the same problem, so it’s not isolated. E.g. https://app.circleci.com/pipelines/github/huggingface/transformers/60141/workflows/7a4c5f50-a2e8-40f7-93b7-6cbd9e234b44/jobs/736460/steps which I found at random. Updating the API requests to use that user/project and 736460 as the build number results in the same behavior.
Overall this behavior seems super weird and can’t imagine it being expected. I looked around and didn’t notice any existing threads about this, nor anything on https://status.circleci.com/, nor anything recent/relevant on Track CircleCI Updates - CircleCI. This particular V2 endpoint doesn’t seem to be mentioned in CircleCI API either.
Any ideas on the cause/solution for this?