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

[now-cli] Spawn builder child processes with stdio: 'inherit' in now dev #3113

Merged
merged 14 commits into from
Oct 17, 2019

Conversation

TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Oct 1, 2019

Inherit the now dev process stdio streams in builder child processes, so that ANSI color codes may be used when stdout is a TTY.

Examples:

Next.js

Screen Shot 2019-10-01 at 3 42 33 PM

Gatsby (depends on #3112)

Screen Shot 2019-10-01 at 3 40 02 PM

Fixes #3135.

…ow dev`

Inherit the `now dev` process stdio streams in builder child processes,
so that ANSI color codes may be used when stdout is a TTY.
@TooTallNate
Copy link
Member Author

Need to look into why this is causing the unit tests to hang. Surely has to do with builder child processes not exiting correctly / completely.

TooTallNate added a commit that referenced this pull request Oct 8, 2019
Explicitly send the SIGINT / SIGTERM signal to `now dev` server child
processes, so that they are not left running when running the now-dev
unit tests.

Related to #3113 which has hanging unit tests that never "complete".
TooTallNate added a commit that referenced this pull request Oct 8, 2019
Explicitly send the SIGINT / SIGTERM signal to `now dev` server child
processes, so that they are not left running when running the now-dev
unit tests.

Related to #3113 which has hanging unit tests that never "complete".
kodiakhq bot pushed a commit that referenced this pull request Oct 8, 2019
Explicitly send the SIGINT / SIGTERM signal to `now dev` server child processes, so that they are not left running when running the now-dev unit tests.

Related to #3113 which has hanging unit tests that never "complete".
kodiakhq bot pushed a commit that referenced this pull request Oct 8, 2019
#3136)

Explicitly send the SIGINT / SIGTERM signal to `now dev` server child processes, so that they are not left running when running the now-dev unit tests.

Related to #3113 which has hanging unit tests that never "complete".
@codecov-io
Copy link

codecov-io commented Oct 16, 2019

Codecov Report

Merging #3113 into canary will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           canary    #3113      +/-   ##
==========================================
+ Coverage   12.29%   12.32%   +0.02%     
==========================================
  Files         268      268              
  Lines       10204    10196       -8     
  Branches     1279     1275       -4     
==========================================
+ Hits         1255     1257       +2     
+ Misses       8859     8852       -7     
+ Partials       90       87       -3
Impacted Files Coverage Δ
src/util/dev/server.ts 58.83% <0%> (-0.15%) ⬇️
src/util/dev/builder.ts 72.64% <0%> (+0.46%) ⬆️
src/util/output/create-output.ts 66.66% <0%> (+23.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5a5683...0e7ed9c. Read the comment docs.

@kodiakhq kodiakhq bot merged commit 21398d7 into canary Oct 17, 2019
@kodiakhq kodiakhq bot deleted the update/now-cli-builder-stdio-inherit branch October 17, 2019 00:18
Timer pushed a commit that referenced this pull request Oct 20, 2019
Explicitly send the SIGINT / SIGTERM signal to `now dev` server child processes, so that they are not left running when running the now-dev unit tests.

Related to #3113 which has hanging unit tests that never "complete".
TooTallNate added a commit that referenced this pull request Oct 21, 2019
#3136)

Explicitly send the SIGINT / SIGTERM signal to `now dev` server child processes, so that they are not left running when running the now-dev unit tests.

Related to #3113 which has hanging unit tests that never "complete".
TooTallNate added a commit that referenced this pull request Oct 21, 2019
…ow dev` (#3113)

Inherit the `now dev` process stdio streams in builder child processes, so that ANSI color codes may be used when stdout is a TTY.

**Examples:**

_Next.js_

<img width="523" alt="Screen Shot 2019-10-01 at 3 42 33 PM" src="https://user-images.githubusercontent.com/71256/66006087-4fe75780-e462-11e9-927f-1e81466c4108.png">

_Gatsby_ (depends on #3112)

<img width="507" alt="Screen Shot 2019-10-01 at 3 40 02 PM" src="https://user-images.githubusercontent.com/71256/66006094-5d9cdd00-e462-11e9-81da-e60bd9516778.png">

Fixes #3135.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color-coded terminal output from Next.js not included in 'now dev' output
4 participants