chore(cdk-cli-wrapper): create a cli wrapper for invoking the cdk#19518
Merged
mergify[bot] merged 4 commits intoaws:masterfrom Mar 23, 2022
corymhall:corymhall/exec-cdk
Merged
chore(cdk-cli-wrapper): create a cli wrapper for invoking the cdk#19518mergify[bot] merged 4 commits intoaws:masterfrom corymhall:corymhall/exec-cdk
mergify[bot] merged 4 commits intoaws:masterfrom
corymhall:corymhall/exec-cdk
Conversation
This is initially needed for the integration testing project. For integration testing we need to be able to programmatically invoke the CLI and control which arguments are passed to the CLI. We could have just included this as part of the integration testing library that we will be creating, but since the logic is pretty self contained this allows us to eventually publish this as a separate library for customers to use. Initially we will not publish this externally, but it is configured with jsii so we can in the future. This PR adds the base functionality needed, and the goal will be to iterate on this as we work on creating the integration testing library. I have taken the command options from the aws-cdk package, which does introduce some duplication. Ideally it would be cool if we could define these in a single place and somehow autogenerate the cli args from the interfaces. Since we don't add new CLI options that often, I think this is fine for now. The `ICdk` interface is similar to the [IAws](https://github.com/aws/aws-cdk/blob/fe0ecb48d98f3a33237ae80664610611b90873a9/packages/cdk-assets/lib/aws.ts#L6) interface in `cdk-assets` which will allow us to create different "clients" (e.g. we could create another one in `aws-cdk` that just uses the functions there).
Contributor
Author
|
I wonder if it is possible (or even a good idea) to try and bundle the CLI. Now that we have a process to bundle the CLI, can we utilize that to include the bundle in this package? |
otaviomacedo
approved these changes
Mar 23, 2022
Contributor
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Collaborator
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Contributor
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
StevePotter
pushed a commit
to StevePotter/aws-cdk
that referenced
this pull request
Apr 27, 2022
…s#19518) This is initially needed for the integration testing project. For integration testing we need to be able to programmatically invoke the CLI and control which arguments are passed to the CLI. We could have just included this as part of the integration testing library that we will be creating, but since the logic is pretty self contained this allows us to eventually publish this as a separate library for customers to use. Initially we will not publish this externally, but it is configured with jsii so we can in the future. This PR adds the base functionality needed, and the goal will be to iterate on this as we work on creating the integration testing library. I have taken the command options from the aws-cdk package, which does introduce some duplication. Ideally it would be cool if we could define these in a single place and somehow autogenerate the cli args from the interfaces. Since we don't add new CLI options that often, I think this is fine for now. The `ICdk` interface is similar to the [IAws](https://github.com/aws/aws-cdk/blob/fe0ecb48d98f3a33237ae80664610611b90873a9/packages/cdk-assets/lib/aws.ts#L6) interface in `cdk-assets` which will allow us to create different "clients" (e.g. we could create another one in `aws-cdk` that just uses the functions there). ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: ~* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)~ ### New Features ~* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?~ ~* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?~ *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is initially needed for the integration testing project. For
integration testing we need to be able to programmatically invoke the
CLI and control which arguments are passed to the CLI.
We could have just included this as part of the integration testing
library that we will be creating, but since the logic is pretty self
contained this allows us to eventually publish this as a separate
library for customers to use. Initially we will not publish this
externally, but it is configured with jsii so we can in the future.
This PR adds the base functionality needed, and the goal will be to
iterate on this as we work on creating the integration testing library.
I have taken the command options from the aws-cdk package, which does
introduce some duplication. Ideally it would be cool if we could define
these in a single place and somehow autogenerate the cli args from the
interfaces. Since we don't add new CLI options that often, I think this
is fine for now.
The
ICdkinterface is similar to the IAwsinterface in
cdk-assetswhich will allow us to create different"clients" (e.g. we could create another one in
aws-cdkthat just usesthe functions there).
All Submissions:
Adding new Unconventional Dependencies:
* [ ] This PR adds new unconventional dependencies following the process described hereNew Features
* [ ] Have you added the new feature to an integration test?* [ ] Did you usecdk-integto deploy the infrastructure and generate the snapshot (i.e.cdk-integwithout--dry-run)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license