-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: correct installLatestAwsSdkDefault flag docs #28887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That markdown file will get overwritten the next time the package is built. If this documentation change is correct, I believe this needs to be changed by specifying defaults: { v2: true }
in features.ts
. I am not sure if that will have any other downstream effects.
The change would be somewhere around here:
aws-cdk/packages/aws-cdk-lib/cx-api/lib/features.ts
Lines 647 to 649 in 6a7a24a
compatibilityWithOldBehaviorMd: 'Set installLatestAwsSdk: true on all resources that need it.', | |
introducedIn: { v2: '2.60.0' }, | |
recommendedValue: false, |
This is the code that performs the generation of that markdown file:
aws-cdk/packages/aws-cdk-lib/cx-api/build-tools/flag-report.ts
Lines 95 to 99 in 6a7a24a
flag.introducedIn.v2 | |
? [flag.introducedIn.v2, renderValue(flag.defaults?.v2 ?? false), renderValue(flag.recommendedValue)] | |
: flag.defaults?.v2 !== undefined | |
? ['(default in v2)', renderValue(flag.defaults?.v2), ''] | |
: ['(not in v2)', '', ''], |
Thanks @kylelaker ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think there should be some other files that are modified as a consequence of this if you were to build the aws-cdk-lib
package. CONTRIBUTING.md
has details on how to do that, but you probably would want to do the following:
- In the base of the repo run
yarn install
to install all the CDK dependencies - Move into the
aws-cdk-lib
directory withcd packages/aws-cdk-lib
- Build that package and its dependencies with
../../scripts/buildup
From there, you can run tests locally with yarn test
. The CodeBuild check on the PR will also run the full test suite after you push.
Co-authored-by: Kyle Laker <[email protected]>
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@kylelaker You were right that there were unintended changes from this. It looks like there was an assumption built in that flags would always end up being true in v2. It is causing the "Flags with a different default in v2" section to be updated incorrectly. Example:
Here is an example of a {
"context": {
"@aws-cdk/core:newStyleStackSynthesis": false,
"@aws-cdk/core:stackRelativeExports": false,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": false,
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": false,
"@aws-cdk/aws-lambda:recognizeVersionProps": false,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": false,
"@aws-cdk/customresources:installLatestAwsSdkDefault": false
}
} |
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
Not stale, just waiting on an answer still :( |
Correcting docs about this flag as the implementation still defaults to true.
https://github.com/aws/aws-cdk/blob/v2.123.0/packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts#L471-L473
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license