Skip to content
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

(cdk migrate): process.stdout.clearLine is not a function #29173

Open
Lock128 opened this issue Feb 19, 2024 · 3 comments
Open

(cdk migrate): process.stdout.clearLine is not a function #29173

Lock128 opened this issue Feb 19, 2024 · 3 comments
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI toolkit/migrate Related to cdk migrate

Comments

@Lock128
Copy link

Lock128 commented Feb 19, 2024

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

@Lock128 Lock128 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Feb 19, 2024
@Lock128 Lock128 changed the title (module name): (short issue description) (cdk migrate): process.stdout.clearLine is not a function Feb 19, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Feb 19, 2024
@pahud pahud added p1 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 20, 2024
@pahud
Copy link
Contributor

pahud commented Feb 20, 2024

Thanks for reporting. We'll track and bring this to the maintainer.

@alexforsyth
Copy link

Are you able to post your workflow? (or the relevant portions of it?)

@Lock128
Copy link
Author

Lock128 commented Feb 20, 2024

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/build@v1.0.0
    # 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

@TheRealAmazonKendra TheRealAmazonKendra added the toolkit/migrate Related to cdk migrate label Feb 21, 2024
@pahud pahud added the cli Issues related to the CDK CLI label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI toolkit/migrate Related to cdk migrate
Projects
None yet
Development

No branches or pull requests

4 participants