cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
468 stars 61 forks source link

eliminate dependencies on alpha cdk packages #371

Closed jesterhazy closed 1 year ago

jesterhazy commented 1 year ago

Feature scope

core

Describe your suggested feature

This package has dev/peer dependencies on alpha CDK packages. The versioning scheme for CDK alpha packages makes it hard for users of this package to stay up to date with CDK releases (see https://github.com/aws/aws-cdk/issues/24431 for context).

The alpha dependencies that this package consumes (@aws-cdk/aws-apigatewayv2-alpha, @aws-cdk/aws-redshift-alpha, @aws-cdk/aws-synthetics-alpha) all have stable versions now. We should update those dependencies to use the stable versions, to simplify dependency management for users of this package. This will also require updating the minimum version of aws-cdk-lib.

This will require a version bump since we are changing the minimum required version peer dependencies.

echeung-amzn commented 1 year ago

The versioning scheme for CDK alpha packages makes it hard for users of this package to stay up to date with CDK releases (see https://github.com/aws/aws-cdk/issues/24431 for context).

This is definitely something I regret from the transition from monocdk to aws-cdk-lib.

You can always specify overrides in your package.json though, assuming there's no breaking changes that affect the functionality:

"dependencies": {
  "@aws-cdk/aws-apigatewayv2-alpha": "2.77.0-alpha.0",
  "@aws-cdk/aws-redshift-alpha": "2.77.0-alpha.0",
  "@aws-cdk/aws-synthetics-alpha": "2.77.0-alpha.0",
  "aws-cdk-lib": "2.77.0",
  "cdk-monitoring-constructs": "3.1.2",
  ...
},
"overrides": {
  "cdk-monitoring-constructs": {
    "@aws-cdk/aws-apigatewayv2-alpha": "$@aws-cdk/aws-apigatewayv2-alpha",
    "@aws-cdk/aws-redshift-alpha": "$@aws-cdk/aws-redshift-alpha",
    "@aws-cdk/aws-synthetics-alpha": "$@aws-cdk/aws-synthetics-alpha"
  }
}

The alpha dependencies that this package consumes (@aws-cdk/aws-apigatewayv2-alpha, @aws-cdk/aws-redshift-alpha, @aws-cdk/aws-synthetics-alpha) all have stable versions now.

Did I miss something? I don't see any stable versions as of aws-cdk-lib v2.80.0.

jesterhazy commented 1 year ago

Oh! You are right. I was misled by the non-alpha package names in the cdk lib api docs. Some other packages include alpha in the module name, and these do not, so I got excited.

I am aware of the overrides workaround, but would love to not need it.

jesterhazy commented 1 year ago

closing since there is no solution right now.

echeung-amzn commented 1 year ago

Fingers crossed they do stabilize at some point. When that happens, we'll definitely do a version bump and eliminate those peer dependencies.

You can also track #212 for the same issue.