-
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(toolkit): capture all output from an app #33259
base: main
Are you sure you want to change the base?
Conversation
import { AssemblyBuilder, CdkAppSourceProps } from '../source-builder'; | ||
|
||
export abstract class CloudAssemblySourceBuilder { | ||
/** | ||
* Helper to provide the CloudAssemblySourceBuilder with required toolkit services | ||
* @deprecated this should move to the toolkit really. | ||
*/ | ||
protected abstract toolkitServices(): Promise<ToolkitServices>; | ||
protected abstract sourceBuilderServices(): Promise<ToolkitServices>; |
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.
renaming this to make it clear this should only be used in the source builder
// Default codes -- all 0000 codes | ||
CDK_TOOLKIT_I0000: 'Default toolkit info code', | ||
CDK_TOOLKIT_E0000: 'Default toolkit error code', | ||
CDK_TOOLKIT_W0000: 'Default toolkit warning code', | ||
CDK_SDK_I0000: 'Default sdk info code', | ||
CDK_SDK_E0000: 'Default sdk error code', | ||
CDK_SDK_WOOOO: 'Default sdk warning code', | ||
CDK_ASSETS_I0000: 'Default assets info code', | ||
CDK_ASSETS_E0000: 'Default assets error code', | ||
CDK_ASSETS_W0000: 'Default assets warning code', | ||
CDK_ASSEMBLY_I0000: 'Default assembly info code', | ||
CDK_ASSEMBLY_E0000: 'Default assembly error code', | ||
CDK_ASSEMBLY_W0000: 'Default assembly warning code', |
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.
I don't want to allow explicitly using this code for now. When generating the docs page we can probably inject the description differently.
return { | ||
ioHost: this.ioHost, | ||
ioHost: withAction(this.ioHost, 'assembly'), |
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.
Messages previously came through without an action.
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)
@@ -104,6 +105,7 @@ | |||
"promptly": "^3.2.0", | |||
"proxy-agent": "^6.4.0", | |||
"semver": "^7.6.3", | |||
"split2": "^4.2.0", |
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.
Taking a new dependency here to split a stream on new lines. This is fairly complex to do, so rather have it handled by a tested module. The dep is very popular (>14mio weekly downloads) and is maintained by an extermely well-known Node.JS core contributor.
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.
No app should do that, but you never know...
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33259 +/- ##
=======================================
Coverage 80.84% 80.84%
=======================================
Files 232 232
Lines 14135 14135
Branches 2460 2460
=======================================
Hits 11428 11428
Misses 2427 2427
Partials 280 280
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 |
Issue #32997
Relates to #32997
Reason for this change
When a CDK app is invoked by a sub-shell, we need to capture all output by lines and send it to the IoHost.
Description of changes
Adds an
EventPublisher
interface to theexecInChildProcess
helper. This is getting passed in a publisher that uses the IoHost.Inspired from the ShellEventPublisher in cdk-assets.
Describe any new or updated permissions being added
n/a
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license