Closed marcdrury closed 1 year ago
New commit makes the path to v2 of the circleci into a new variable so that other places where use of v1.1 is required aren't broken.
I was looking into this a bit as well and am very confused. I can confirm I can see the artifacts on the v2 API but the v1 API says Build not found
. However if I curl
, or use an incognito tab, both of them return Bad request.
It feels like this is either an issue with auth, or circle CI is having some issues. I also get an error when trying to view the artifacts on their UI as well: https://app.circleci.com/pipelines/github/crystal-lang/crystal/11513/workflows/28e0e92b-deaf-43ce-87f9-97955d908621/jobs/75102/artifacts Error: [Network Error] Failed to fetch
, so not sure what's going on.
In incognito mode visiting https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75102 first will cause https://circleci.com/api/v2/project/github/crystal-lang/crystal/75102/artifacts to return the expected response. Seems pretty weird considering they're different versions of the API. 😵
I can access the artifacts on both API endpoints now. My guess it there was some operational problems at circleci.
As I understand the API documentation v1 and v2 are just different interfaces for accessing the same data (https://circleci.com/docs/api-intro/). It certainly makes sense to upgrade to v2, but we should expect older artifacts to be available in that API version as well. We should update to the API v2 endpoint in all places.
Well that's even more bizarre then as I still can't access either via curl
.
The other issue is it seems not all endpoints work on both versions. E.g. https://circleci.com/api/v2/project/github/crystal-lang/crystal/tree/master?filter=successful&shallow=true&limit=100&offset=0. And https://circleci.com/docs/api/v2/index.html doesn't even seem to mention you can access artifacts.
Today's build is showing the same behavior. Going to create a thread on their forums about it in the morning.
EDIT: https://discuss.circleci.com/t/issues-fetching-artifacts-vi-ui-and-api/47496
It was indeed a CircleCI issue and they have since rolled that change back. I confirmed both v1 and v2 API endpoints along with the UI are correctly returning the artifacts. Going to close this given it was fixed upstream.
I suppose it might still make sense to upgrade to V2, though? Should we track that in an issue?
Update CircleApiBase to use the path to v2 of circleci's API rather than v1.1.
The build artifacts for nightly build 75102 are only available for the URL of v2 of the API, which is currently causing attempts to install the nightly build to fail.
See below: https://circleci.com/api/v1.1/project/github/crystal-lang/crystal/75102/artifacts https://circleci.com/api/v2/project/github/crystal-lang/crystal/75102/artifacts