Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: timeouts on PR builds by querying against npm (aws#20409)
As part of AWS CDK builds, we run a script that checks that the API does not introduce any breaking changes with respect to the latest published version of AWS CDK. To do so, this currently queries against the GitHub API to check what the latest releases were. However, this can fail because without using specific GitHub credentials, we are limited to 60 API calls per minute. Even [with retries](aws#19336), this can still timeout, in which case the build fails suddenly without an error message: ``` <thousands of lines of logs omitted> lerna success - @aws-cdk/prlint lerna success - @aws-cdk/ubergen lerna success - @aws-cdk/yarn-cling real 21m40.119s user 353m7.607s sys 27m49.086s Listing jsii packages... lerna notice cli v4.0.0 lerna info ci enabled lerna success found 254 packages Filtering on existing packages on NPM... Determining baseline version... Build version: 1.156.1. ``` To avoid this failure mode entire, this PR updates the script to check for the latest AWS CDK version by querying against npm. Both npm and GitHub should be accurate sources of truth AFAIK, and npm does not impose as stringent rate limits on its callers. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information