Skip to content

chore: timeouts on PR builds by querying against npm#20409

Merged
mergify[bot] merged 3 commits intomasterfrom
rybickic/api-compat-timeouts
May 19, 2022
Merged

chore: timeouts on PR builds by querying against npm#20409
mergify[bot] merged 3 commits intomasterfrom
rybickic/api-compat-timeouts

Conversation

@Chriscbr
Copy link
Copy Markdown
Contributor

@Chriscbr Chriscbr commented May 18, 2022

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, 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:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • 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

@Chriscbr Chriscbr requested review from a team and rix0rrr May 18, 2022 22:45
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented May 18, 2022

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 18, 2022
@github-actions github-actions bot added the p2 label May 18, 2022
@Chriscbr
Copy link
Copy Markdown
Contributor Author

Chriscbr commented May 18, 2022

Oops. 🤦 On closer inspection I don't think there was an actual error, my build just happened to time out (that's why the logs stop abruptly -- maybe there's a way we can surface this to users better?). So maybe this particular fix isn't needed?

@rix0rrr rix0rrr changed the title fix(release-check): timeouts on PR builds by querying against npm chore: timeouts on PR builds by querying against npm May 19, 2022
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably still a good idea to be less throttled.

Aside: I changed this from fix to a chore since it doesn't need to appear in the CHANGELOG: it doesn't provide value to users, so they won't care about it.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 19, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 490ee24
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit a6d830e into master May 19, 2022
@mergify mergify bot deleted the rybickic/api-compat-timeouts branch May 19, 2022 12:30
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented May 19, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

wphilipw pushed a commit to wphilipw/aws-cdk that referenced this pull request May 23, 2022
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*
@rix0rrr rix0rrr added the effort/small Small work item – less than a day of effort label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants