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

fix: change gen 1 patterns to warning message instead of error #2768

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Aug 13, 2024

Description of changes

  • change gen 1 pattern to warning message instead of error
  • remove _allowGen1Patterns from the translation behavior config and always disallow gen 1 patterns in the construct. Gen 1 patterns will always be allowed in Gen 1.
    • We marked this as internal and stated that breaking changes could happen without a major version so we are ok to change this.
CDK / CloudFormation Parameters Changed
  • remove _allowGen1Patterns from the translation behavior config and always disallow gen 1 patterns in the construct.

Issue #, if available

N/A

Description of how you validated changes

N/A

Checklist

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

@@ -153,6 +153,12 @@ export class PredictionsTransformer extends TransformerPluginBase {
};

generateResolvers = (context: TransformerContextProvider): void => {
// This validation can't occur in validate because the api has not been initialized until generateResolvers
if (!context.transformParameters.allowGen1Patterns) {
cdk.Annotations.of(context.api).addWarning(
Copy link
Member Author

@dpilch dpilch Aug 13, 2024

Choose a reason for hiding this comment

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

Annotations also has addDeprecation. I chose to use addWarning here because addDeprecation appears to be geared towards deprecating an entire parameter. We are removing some functionality from a parameter.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Annotations.html#addwbrdeprecationapi-message

@dpilch dpilch marked this pull request as ready for review August 13, 2024 17:13
@dpilch dpilch requested review from a team as code owners August 13, 2024 17:13
@dpilch dpilch marked this pull request as draft August 13, 2024 17:27
@dpilch dpilch changed the title fix: change gen 1 pattern to warning message instead of error fix: change gen 1 patterns to warning message instead of error Aug 13, 2024
@dpilch dpilch marked this pull request as ready for review August 13, 2024 19:59
palpatim
palpatim previously approved these changes Aug 13, 2024
@dpilch dpilch merged commit 97b1f36 into main Aug 19, 2024
6 checks passed
@dpilch dpilch deleted the gen1-pattern-deprecation branch August 19, 2024 20:57
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.

3 participants