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

chore(toolkit): default IoHost supports prompting #33177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Jan 27, 2025

Reason for this change

The ClioIoHost didn't implement requestResponse properly, it just returned the default value.
However since this implementation is supposed to be exactly what the CLI does, we need to implement prompting.

Description of changes

Implements user prompting. This is not currently used yet by the CLI itself, we will enable this in follow-up ticket.

Describe any new or updated permissions being added

n/a

Description of how you validated changes

Added test cases.

Checklist


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

@github-actions github-actions bot added the p2 label Jan 27, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 27, 2025 13:26
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 27, 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.

The pull request linter fails with the following errors:

❌ CLI code has changed. A maintainer must run the code through the testing pipeline (git fetch origin pull/33177/head && git push -f origin FETCH_HEAD:test-main-pipeline), then add the 'pr-linter/cli-integ-tested' label when the pipeline succeeds.

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.

@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 597f187 to efc836f Compare January 29, 2025 10:23
@mrgrain mrgrain changed the title feat(toolkit): default IoHost supports prompting chore(toolkit): default IoHost supports prompting Jan 29, 2025
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 3f15b99 to a48c67f Compare January 29, 2025 13:33
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

small nits, will fully review when there are tests

packages/aws-cdk/lib/toolkit/cli-io-host.ts Outdated Show resolved Hide resolved
packages/aws-cdk/lib/toolkit/cli-io-host.ts Outdated Show resolved Hide resolved
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from a48c67f to 2bb3c0d Compare January 30, 2025 11:53
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 2bb3c0d to 72b8310 Compare January 30, 2025 13:24
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 72b8310 to 15af140 Compare January 30, 2025 13:25
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 15af140 to 4851da4 Compare January 30, 2025 13:38
@mrgrain mrgrain marked this pull request as ready for review January 30, 2025 13:45
@mrgrain mrgrain requested a review from a team as a code owner January 30, 2025 13:45
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.84%. Comparing base (3b2846e) to head (9690636).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #33177      +/-   ##
==========================================
+ Coverage   80.79%   80.84%   +0.05%     
==========================================
  Files         232      232              
  Lines       14106    14135      +29     
  Branches     2450     2460      +10     
==========================================
+ Hits        11397    11428      +31     
+ Misses       2429     2427       -2     
  Partials      280      280              
Flag Coverage Δ
suite.unit 80.84% <100.00%> (+0.05%) ⬆️

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

Components Coverage Δ
packages/aws-cdk 79.64% <100.00%> (+0.10%) ⬆️
packages/aws-cdk-lib/core 82.17% <ø> (ø)

@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 4851da4 to 67a8a8d Compare January 30, 2025 14:01
@mrgrain mrgrain force-pushed the mrgrain/cli/request-response branch from 67a8a8d to 9690636 Compare January 30, 2025 14:13
@mrgrain mrgrain deployed to test-pipeline January 30, 2025 14:14 — with GitHub Actions Active
@aws-cdk-automation
Copy link
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants