feat(cli): introduce the 'watch' command#17240
Merged
mergify[bot] merged 1 commit intoaws:masterfrom Nov 5, 2021
Merged
Conversation
skinny85
commented
Oct 30, 2021
skinny85
commented
Oct 30, 2021
jogold
reviewed
Oct 30, 2021
eladb
suggested changes
Oct 31, 2021
0480620 to
d417ab4
Compare
Contributor
Author
|
@eladb thanks so much for the thorough review! I've incorporated most of your comments, and asked a few clarifying questions for the rest of them. If you could make another pass through the comments, and the code, I would appreciate it - let's get this feature merged! 😊 |
eladb
approved these changes
Nov 2, 2021
eladb
approved these changes
Nov 3, 2021
eladb
approved these changes
Nov 4, 2021
4c1f2e5 to
563666d
Compare
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). |
iliapolo
pushed a commit
that referenced
this pull request
Nov 7, 2021
This PR introduces the "watch" command, in two variants: as a separate new `cdk watch` command, and as an argument to the existing `cdk deploy` command. The "watch" process will observe the project files, defined by the new `"include"` and `"exclude"` settings in `cdk.json` (see aws/aws-cdk-rfcs#383 for details), and will trigger a `cdk deploy` when it detects any changes. The deployment will by default use the new "hotswap" deployments for maximum speed. Since `cdk deploy` is a relatively slow process for a "watch" command, there is some logic to perform intelligent queuing of any file events that happen while `cdk deploy` is running. We will batch all of those events, and trigger a single `cdk deploy` after the current one finishes. This ensures only a single `cdk deploy` command ever executes at a time. The observing of the files, and reacting to their changes, is accomplished using the [`chokidar` library](https://www.npmjs.com/package/chokidar). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
TikiTDO
pushed a commit
to TikiTDO/aws-cdk
that referenced
this pull request
Feb 21, 2022
This PR introduces the "watch" command, in two variants: as a separate new `cdk watch` command, and as an argument to the existing `cdk deploy` command. The "watch" process will observe the project files, defined by the new `"include"` and `"exclude"` settings in `cdk.json` (see aws/aws-cdk-rfcs#383 for details), and will trigger a `cdk deploy` when it detects any changes. The deployment will by default use the new "hotswap" deployments for maximum speed. Since `cdk deploy` is a relatively slow process for a "watch" command, there is some logic to perform intelligent queuing of any file events that happen while `cdk deploy` is running. We will batch all of those events, and trigger a single `cdk deploy` after the current one finishes. This ensures only a single `cdk deploy` command ever executes at a time. The observing of the files, and reacting to their changes, is accomplished using the [`chokidar` library](https://www.npmjs.com/package/chokidar). ---- *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 PR introduces the "watch" command, in two variants: as a separate new
cdk watchcommand,and as an argument to the existing
cdk deploycommand.The "watch" process will observe the project files, defined by the new
"include"and"exclude"settings incdk.json(see aws/aws-cdk-rfcs#383 for details),
and will trigger a
cdk deploywhen it detects any changes.The deployment will by default use the new "hotswap" deployments for maximum speed.
Since
cdk deployis a relatively slow process for a "watch" command,there is some logic to perform intelligent queuing of any file events that happen while
cdk deployis running.We will batch all of those events, and trigger a single
cdk deployafter the current one finishes.This ensures only a single
cdk deploycommand ever executes at a time.The observing of the files, and reacting to their changes, is accomplished using the
chokidarlibrary.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license