Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Feb 11, 2025

The CliIoHost tests using promptly don't run properly on GitHub Actions. The event emitting on process.stdin we used to do doesn't work on GitHub Actions. I don't know the reason, it might be a new Node version or something.

Switching to a fake input stream (streams.PassThrough) seems to solve it on both platforms.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The `CliIoHost` tests using `promptly` don't run properly on GitHub
Actions. The event emitting on `process.stdin` we used to do doesn't
work on GitHub Actions. I don't know the reason, it might be a new Node
version or something.

Switching to a fake input stream (`streams.PassThrough`) seems to solve
it on both platforms.
@rix0rrr rix0rrr requested a review from a team as a code owner February 11, 2025 10:35
@github-actions github-actions bot added the p2 label Feb 11, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 11, 2025 10:35
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 11, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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)

@rix0rrr rix0rrr changed the title chore(cli): tests don't run on GitHub Actions chore(cli): tests involving promptly don't work on GitHub Actions Feb 11, 2025
@codecov
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.92%. Comparing base (14b1098) to head (18f9630).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33381   +/-   ##
=======================================
  Coverage   80.92%   80.92%           
=======================================
  Files         236      236           
  Lines       14256    14256           
  Branches     2491     2491           
=======================================
  Hits        11537    11537           
  Misses       2434     2434           
  Partials      285      285           
Flag Coverage Δ
suite.unit 80.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 79.74% <ø> (ø)
packages/aws-cdk-lib/core 82.20% <ø> (ø)

Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like mixing production code and testing infrastructure code.

Can we either:

  • Monkey-patch promptly to use a testing stream (preferred)
  • make the the input stream a full feature of the CliIoHost

@rix0rrr rix0rrr added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Feb 11, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 11, 2025 15:32

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@rix0rrr rix0rrr requested a review from mrgrain February 11, 2025 15:42
@rix0rrr
Copy link
Contributor Author

rix0rrr commented Feb 11, 2025

Updated to restrict changes purely to testing code

@mergify
Copy link
Contributor

mergify bot commented Feb 11, 2025

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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 18f9630
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 38abbfb into main Feb 11, 2025
19 of 20 checks passed
@mergify
Copy link
Contributor

mergify bot commented Feb 11, 2025

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).

@mergify mergify bot deleted the huijbers/test-promptly branch February 11, 2025 17:02
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants