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

check age of aws-cdk/core during ci #192

Merged
merged 3 commits into from
Jan 22, 2021
Merged

check age of aws-cdk/core during ci #192

merged 3 commits into from
Jan 22, 2021

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented Jan 21, 2021

What does this change?

We introduced dependabot in #55 to keep our dependencies up to date. However dependabot doesn't report against the CDK libraries (related dependabot/dependabot-core#1171).

This adds a fairly gnarly bash script to:

  • List all versions of @aws-cdk/core (and assume it's ordered!)
  • Use jq to find how out of date we are
  • If we are 5* versions out of date, exit 1

This is all run in CI.

Also takes inspiration from Source and uses npm-check-updates to update the @aws-cdk/* libraries. All wrapped in a new update-aws-cdk script.

Related to #191.

*this was an arbitrary choice, we can tweak as needed

Does this change require changes to existing projects or CDK CLI?

Assuming #191 goes in first, then no.

How to test

Run the two new scripts locally:

  • ./script/check-aws-cdk
  • ./script/update-aws-cdk

How can we measure success?

We keep up to date with @aws-cdk/* more frequently, especially as they release fairly often.

Have we considered potential risks?

Too much of a chore to keep up to date?

@akash1810 akash1810 requested a review from a team January 21, 2021 20:02
@akash1810 akash1810 force-pushed the aa-aws-cdk branch 2 times, most recently from cc50f77 to 21c4272 Compare January 22, 2021 08:42
Copy link
Contributor

@jamie-lynch jamie-lynch left a comment

Choose a reason for hiding this comment

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

Nice 👍

Fail the build if we're more than 5 versions out of date.
@akash1810
Copy link
Member Author

This isn't quite working as intended after rebasing with #191 as the diff should be 0 not 111! Will investigate.

@jamie-lynch
Copy link
Contributor

This isn't quite working as intended after rebasing with #191 as the diff should be 0 not 111! Will investigate.

Looks like we went from ~1.74.0 to 1.86.0 in #191 but the script still removes the first char of the installed version to account for the ~

script/check-aws-cdk Outdated Show resolved Hide resolved
@akash1810 akash1810 merged commit 7938dbd into main Jan 22, 2021
@akash1810 akash1810 deleted the aa-aws-cdk branch January 22, 2021 15:15
akash1810 added a commit that referenced this pull request Apr 10, 2021
We perform a check at CI time to ensure the version of aws-cdk libraries we're using are within 5 versions of the latest available.

If we're out of date, CI fails with instructions to run `./script/update-aws-cdk`. This script uses ncu (npm-check-updates) to update the aws-cdk dependencies.

This change updates the call to ncu to:
  - Configure ncu to update the "aws-cdk" dependency in addition to @aws-cdk/*
  - Add the --deep flag to "Run recursively in current working directory."

See:
  - https://www.npmjs.com/package/npm-check-updates
  - #192
akash1810 added a commit that referenced this pull request Sep 30, 2022
Reduce friction of raising a PR by the AWS CDK version check.

First introduced in #192, these checks were added to force us to keep up to date with the rapid release cadence.

However as we've recently slowed down development in the repository, this requirement is causing friction for contributors.

Let's remove it in favour of some automation.
akash1810 added a commit that referenced this pull request Sep 30, 2022
Reduce friction of raising a PR by the AWS CDK version check.

First introduced in #192, these checks were added to force us to keep up to date with the rapid release cadence.

However as we've recently slowed down development in the repository, this requirement is causing friction for contributors.

Let's remove it in favour of some automation.
akash1810 added a commit that referenced this pull request Sep 30, 2022
Reduce friction of raising a PR by the AWS CDK version check.

First introduced in #192, these checks were added to force us to keep up to date with the rapid release cadence.

However as we've recently slowed down development in the repository, this requirement is causing friction for contributors.

Let's remove it in favour of some automation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants