Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release-check): add retries #19336

Merged
merged 2 commits into from
Mar 11, 2022
Merged

chore(release-check): add retries #19336

merged 2 commits into from
Mar 11, 2022

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Mar 11, 2022

The find-latest-release script occasionally times out on PR builds.

Add sleeps and retries. The retries are pretty hefty because the API
limits are quite low. We can't just toss a GitHub Token in there, as
anyone who submits a PR would have access to it. This is the cheapest
fix for now.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The `find-latest-release` script occasionally times out on PR builds.

Add sleeps and retries. The retries are pretty hefty because the API
limits are quite low. We can't just toss a GitHub Token in there, as
anyone who submits a PR would have access to it. This is the cheapest
fix for now.
@rix0rrr rix0rrr requested a review from a team March 11, 2022 00:30
@rix0rrr rix0rrr self-assigned this Mar 11, 2022
@gitpod-io
Copy link

gitpod-io bot commented Mar 11, 2022

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 11, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 11, 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
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: ea68fc4
  • 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 d91b2e2 into master Mar 11, 2022
@mergify mergify bot deleted the huijbers/release-check branch March 11, 2022 15:00
@mergify
Copy link
Contributor

mergify bot commented Mar 11, 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).

TheRealAmazonKendra pushed a commit to TheRealAmazonKendra/aws-cdk that referenced this pull request Mar 11, 2022
The `find-latest-release` script occasionally times out on PR builds.

Add sleeps and retries. The retries are pretty hefty because the API
limits are quite low. We can't just toss a GitHub Token in there, as
anyone who submits a PR would have access to it. This is the cheapest
fix for now.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this pull request May 19, 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](#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*
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*
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants