-
Notifications
You must be signed in to change notification settings - Fork 4.3k
refactor(cli): bootstrap & deployments are using IoHost #33451
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
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 fails with the following errors:
❌ CodeCov is indicating a drop in code coverage
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.
59eea4d to
3668ceb
Compare
3668ceb to
f8a379b
Compare
kaizencc
left a comment
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.
at its core the payout of this PR should be a 1-1 mapping of the existing logging functions in bootstrap & deployments to ioHost.notify() right?
are there any particular parts of this PR that warrant additional scrutiny? i might miss it given the large diff of passing { ioHost, action } everywhere.
| return new Deployments({ | ||
| sdkProvider: await this.sdkProvider(action), | ||
| toolkitStackName: this.toolkitStackName, | ||
| ioHost: this.ioHost as any, // @todo temporary while we have to separate IIoHost interfaces |
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.
why do we have separate IIoHost interfaces?
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.
Because currently the toolkit depends on the CLI package (and therefore the CLI cannot depend on the toolkit). Once the repo split is complete, we will introduce a new private intermediate package that both toolkit and CLI can depend on.
| } | ||
|
|
||
| export async function cleanupOldChangeset(changeSetName: string, stackName: string, cfn: ICloudFormationClient) { | ||
| async function cleanupOldChangeset( |
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.
does cleanupOldChangeset not get exposed to users of aws-cdk? asking if you've checked that it's safe to unexport this function
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.
It's only use is inside this file. We have previously compiled a list of symbols that are "externally used" and this is not part of it.
That's correct. |
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.
@kaizencc special attention
| class ParallelSafeAssetProgress extends BasePublishProgressListener { | ||
| private readonly prefix: string; | ||
|
|
||
| constructor(prefix: string, { ioHost, action }: IoMessaging) { | ||
| super({ ioHost, action }); | ||
| this.prefix = prefix; | ||
| } | ||
|
|
||
| protected getMessage(type: cdk_assets.EventType, event: cdk_assets.IPublishProgress): string { | ||
| return `${this.prefix}${type}: ${event.message}`; |
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.
@kaizencc special attention
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (81.25%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #33451 +/- ##
==========================================
+ Coverage 81.00% 81.01% +0.01%
==========================================
Files 238 238
Lines 14271 14290 +19
Branches 2492 2494 +2
==========================================
+ Hits 11560 11577 +17
- Misses 2425 2426 +1
- Partials 286 287 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
|
Closed in favor of aws/aws-cdk-cli#40 |
|
Comments on closed issues and PRs are hard for our team to see. |
Reason for this change
Make bootstrap and deployment api code use the new IoHost interface.
This will be required so we can accurately track the action for each log.
Description of changes
Change a lot of logging to use the IoHost.
There is a temporary annoyance that we also have to pass the action. In future we will likely replace this with an internal IoHost version that is action aware. To make this easier for now, a new temporary interface
IoMessagingis introduced. This is also why I'm using restructuring{ ioHost, action }in many places. To idea being that removing the action later on will be simpler or at least give cleaner diff.Describe any new or updated permissions being added
n/a
Description of how you validated changes
existing tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license