-
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
fix(cli): trace output (-vv) is useless when files are uploaded #33104
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.
(This review is outdated)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33104 +/- ##
==========================================
+ Coverage 81.54% 81.57% +0.02%
==========================================
Files 226 227 +1
Lines 13777 13793 +16
Branches 2414 2419 +5
==========================================
+ Hits 11235 11251 +16
Misses 2270 2270
Partials 272 272
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
cef26d0
to
0d78afc
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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
When running the CDK CLI in trace mode (with
-vv
), e.g.cdk deploy -vv
we log all SDK calls and their inputs. For file uploads, the input contains the buffer of the file to be uploaded. This results in really bad output:Now in this case we are only uploading 138 bytes. Imagine what this log looks like for files of 10MiB or 100MiB. Reportedly this also crashed every terminal.
Description of changes
There's no need to log the buffer bytes. Instead replace it with a string indicating its a buffer and the buffer length:
Describe any new or updated permissions being added
n/a
Description of how you validated changes
Tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license