aws-cdk
aws-cdk copied to clipboard
(cdk migrate): process.stdout.clearLine is not a function
Describe the bug
Trying to execute cdk migrate in automation - e.g. CodeCatalyst workflow - fails
Similar issue to this one: here
Expected Behavior
I'd expect the workflow to complete but to log the errors or challenges.
Current Behavior
Workflow fails with this error:
This command is an experimental feature.
Using the latest successful scan which is 0 days, 3 hours, and 19 minutes old.
No filters provided. Retrieving all resources from scan.
finding related resources.
Found 62 resources.
Generating CFN template from scanned resources.
Please wait, template creation in progress. This may take a couple minutes.
❌ Migrate failed for myCloudFormationStack: process.stdout.clearLine is not a function
process.stdout.clearLine is not a function
Reproduction Steps
Execute cdk migrate in the codecatalyst workflow
Possible Solution
use a logging framework instead of process.stdout - or maybe find a different way?
Additional Information/Context
I am trying to execute cdk migrate in the context of a CodeCatalyst Workflow
https://github.com/aws/aws-cdk/blame/da0b82c21e1ddd3c301db8f98e39767e07ff32fc/packages/aws-cdk/lib/commands/migrate.ts#L449
CDK CLI Version
latest
Framework Version
No response
Node.js Version
16
OS
linux
Language
TypeScript
Language Version
No response
Other information
No response
Thanks for reporting. We'll track and bring this to the maintainer.
Are you able to post your workflow? (or the relevant portions of it?)
Of course
Name: Workflow_5b48
SchemaVersion: "1.0"
# Optional - Set automatic triggers.
Triggers:
- Type: PUSH
Branches:
- main
# Required - Define action configurations.
Actions:
Build_69:
# Identifies the action. Do not modify this value.
Identifier: aws/[email protected]
# Specifies the source and/or artifacts to pass to the action as input.
Inputs:
# Optional
Sources:
- WorkflowSource # This specifies that the action requires this Workflow as a source
Outputs:
# Optional; Automatically discover reports for popular test frameworks
AutoDiscoverReports:
Enabled: true
# Use as prefix for the report files
ReportNamePrefix: rpt
# Defines the action's properties.
Configuration:
# Required - Steps are sequential instructions that run shell commands
Steps:
- Run: npm install -g aws-cdk
- Run: echo "Hello, World!"
- Run: cdk migrate --from-scan --stack-name "myCloudFormationStack"
Compute:
Type: Lambda
Environment:
Connections:
- Role: CodeCatalystWorkflowDevelopmentRole-AWS-Heroes
Name: johannes-servicetests
Name: servicetests