Skip to content

Conversation

avangelillo
Copy link
Contributor

What does this PR do?

Automate the cdk upgrade flow. To do this I created a script to parsed the cdk version out of the projen rc file, then check the npm version from 1 month ago. I chose that because that's the minimum version that someone needs, so 1 month behind seemed like a middle ground between being recent enough and not having someone have to go back and forth between upgrading the datadog cdk constructs and cdk versions, if they're doing some kind of weekly upgrade like we usually have. Let me know if you prefer a different value for this.

The script has to be included in the github upgrade workflow, so we have to overwrite it in projen since its managed for us.

Projen docs about this: https://projen.io/docs/project-types/aws-cdk-construct-library/#depending-on-aws-cdk-lib

Motivation

The CDK version is getting out of date, we're about 7 months behind: Issues: #465

Testing Guidelines

I tested this locally and it seems to work, I'll run it manually once this is merged to know for sure.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

Automate the cdk upgrade flow.  To do this I created a script to parsed
the cdk version out of the projen rc file, then check the npm version
from  1 month ago.  I chose that because that's the minimum version that
someone needs, so 1 month behind seemed like a middle ground between being
recent enough and not being so aggressive that someone is constantly having
to upgrade cdk because of us.  Let me know if you prefer a different value
for this.  If they don't match, update it.

I tested this locally and it seems to work, I'll run it manually once
this is merged to know for sure.

The script has to be included in the github upgrade workflow, so we have
to overwrite it in projen since its managed for us.

Issues: #465

Projen docs about this: https://projen.io/docs/project-types/aws-cdk-construct-library/#depending-on-aws-cdk-lib
@avangelillo avangelillo changed the title Automate cdk upgrade chore: Automate cdk upgrade Aug 5, 2025
@avangelillo avangelillo marked this pull request as ready for review August 5, 2025 12:22
@avangelillo avangelillo requested a review from a team as a code owner August 5, 2025 12:22
@avangelillo avangelillo merged commit 2c0528e into main Aug 5, 2025
10 of 11 checks passed
@avangelillo avangelillo deleted the alex.angelillo/keepCDKVersionUpToDate branch August 5, 2025 16:54
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