mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
0e87cd9a81
In PR #45349 we switched to using version 2 of the CircleCI API. It turns out that this version of the API (in addition to different URLs) also returns different info from some endpoints, which we have failed to account for. More specifically, the v2 API response for a job does not contain info that we need in [BuildRetriever][1]. As an example, see the API responses for an `aio_preview` run: - [API v1.1][2] - [API v2][3] This commit updates the code to handle API v2 responses. In addition, since the info we need is not present in the job info (as it was with the previous version of the API), we now also retrieve the pipeline info. NOTE: This issue did not manifest earlier, because the preview server code on the VM was not updated to the latest version (that tried to use API v2) due to a different error. This error was fixed with PR #45895, which allowed the preview server to be updated on the VM and uncovered the API v2 incompatibility. [1]: https://github.com/angular/angular/blob/baa3e18812127e7266580f4cd202a4cb3204cbcb/aio/aio-builds-setup/dockerbuild/scripts-js/lib/preview-server/build-retriever.ts#L39-L45 [2]: https://circleci.com/api/v1.1/project/github/angular/angular/1163816 [3]: https://circleci.com/api/v2/project/gh/angular/angular/job/1163816 Fixes #45931 PR Close #45934