Skip to content

chore(cli): model positional arguments in CliArguments#32718

Merged
mergify[bot] merged 8 commits intomainfrom
conroy/positional
Jan 5, 2025
Merged

chore(cli): model positional arguments in CliArguments#32718
mergify[bot] merged 8 commits intomainfrom
conroy/positional

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

@kaizencc kaizencc commented Jan 2, 2025

This PR does not change CLI functionality (yet)

This PR models positional arguments in CliArguments. Currently they are supposed to be modeled as part of the the default property _: [Command, ...string]. This means that in cli.ts we mean to use it as so: args._[1] instead of args.ID. This is a downgrade, so I've updated the following:

Positional arguments are now modeled in CliArguments so if the deploy command has STACKS argument, it shows up as part of its DeployOptions. With this model we will replace args.ID with args.acknowledge.ID which I believe to be acceptable.

Now, the default property is modeled as _: Command so that we don't duplicate information.

Checklist


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

@kaizencc kaizencc requested a review from a team as a code owner January 2, 2025 23:25
@github-actions github-actions bot added the p2 label Jan 2, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 2, 2025 23:25
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 2, 2025
@kaizencc kaizencc added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Jan 2, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.96%. Comparing base (dd6a2f4) to head (616d12e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32718   +/-   ##
=======================================
  Coverage   66.96%   66.96%           
=======================================
  Files         329      329           
  Lines       18667    18667           
  Branches     3260     3260           
=======================================
  Hits        12501    12501           
  Misses       5839     5839           
  Partials      327      327           
Flag Coverage Δ
suite.unit 66.96% <ø> (ø)

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 3, 2025
}
const cliArguments: CliArguments = {
_: args._,
_: args._[0],
Copy link
Copy Markdown
Contributor

@HBobertz HBobertz Jan 5, 2025

Choose a reason for hiding this comment

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

irrelevant but I actually hate this _ syntax lol

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 5, 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 aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 5, 2025
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

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

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

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 5, 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 merged commit caf2415 into main Jan 5, 2025
1 of 2 checks passed
@mergify mergify bot deleted the conroy/positional branch January 5, 2025 15:51
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 5, 2025

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 Jan 5, 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