-
Notifications
You must be signed in to change notification settings - Fork 458
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
feat(cli): add cdktf watch
command
#817
Conversation
2021022
to
2cb0bdf
Compare
2cb0bdf
to
38b75eb
Compare
41477ba
to
b38cac3
Compare
04e4933
to
4cb7006
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a really cool new feature 🙌
c917bd6
to
d0ef883
Compare
5bc74d3
to
5a18a7c
Compare
5eeccb0
to
b3c99bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When I run this I see starting server and connecting messages. If I didn't read through the implementation I'd be confused to what server is starting and what it's connecting to.
- I see errors twice currently
@DanielMSchmidt Have you set the CDKTF_LOG_LEVEL to something other than the default? |
@ansgarm I don't think so, I believe it was unset. But shouldn't the logs go only into the cdktf.log file anyways? |
@DanielMSchmidt If you set the log level but not the DISABLE_LOGGING flag, it will print the errors afaik |
Yeah that could have been the case :) |
@DanielMSchmidt |
Also massive spoiler for the Office Hours later on 😉 |
7916cd2
to
72663a3
Compare
@DanielMSchmidt Is that file you changed by chance in your Theoretically it should watch every file that is not in your |
No I referenced the docker backend with TerraformAsset that is in ../../application/backend and changed the index.js in there (in the docker e2e example) |
…equires node-pty which needs more advanced configuration to run on windows
…causing the build to run forever
…exit in case of a failure
…e can import it without changing our whole project
also fixes event emitter error when using the useStdoutDimensions hook too often – just use one and pass down the result
92412b8
to
fa23db5
Compare
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Resolves #801
The initial implementation of the new
cdktf watch
command also contains anexperiment in regards to separating the underlying invocation of a synth and of
Terraform for init, plan and apply from the presentation layer (which is in our
case a CLI build with React components using
ink
). The other commands (e.g.cdktf deploy
) which we currently have, make use of React Hooks fororchestrating the underlying steps that are required. Quite early it turned out
to be unreasonable to implement the dynamic nature of the
watch
command usingthose same tools. Instead we opted for trying out a separate process and using a
GraphQL api to connect the two. The main reason for this (as opposed to e.g.
ProtoBuf or REST) was the superior tooling support that exists for this in
TypeScript and React. However, with this prototype now in the open, we will
carefully examine it and assess the pros and cons before jumping ship.