-
Notifications
You must be signed in to change notification settings - Fork 4k
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(cli): simplify config with helper functions #32547
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.
Now we either call helper functions at build time or declare the function call via a typewriter module proxy.
2208129
to
38011d8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32547 +/- ##
==========================================
+ Coverage 78.80% 78.85% +0.04%
==========================================
Files 108 108
Lines 7159 7165 +6
Branches 1319 1319
==========================================
+ Hits 5642 5650 +8
+ Misses 1332 1330 -2
Partials 185 185
Flags with carried forward coverage won't be shown. Click here to find out more.
|
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Reason for this change
Simplify the codegen for CLI config. Previously the generated function expected a number of arguments at call time.
Instead we now require a single helpers object at build time. This holds typewriter references to any function called during config parsing.
Additionally, some the helper functions for init and migrate are now just called at build time. This is fine because these values don't change dynamically unless a code change is made to the CLI.
Description of changes
DynamicValue
stuff all-together and instead we can just check if a value is a typewriter expression.Description of how you validated changes
Existing tests cover this. Run additional manual verification as well.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license