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

Refactor log streaming #462

Merged
merged 3 commits into from Dec 29, 2021
Merged

Refactor log streaming #462

merged 3 commits into from Dec 29, 2021

Conversation

jaredpalmer
Copy link
Contributor

@jaredpalmer jaredpalmer commented Dec 29, 2021

Fix #422 #374 #452 #453

  • Refactor log streaming in to move away from io.MultiReader which was trying to concatenate streams, and failing when commands wrote directly to stderr. This PR inverts log steam logic to use io.MultiWriter, but only when actually caching, as well as new logstreamer primitive.
  • Logs now include their own cache hit, replaying output [hash] line
    • Subsequently, we change the global internal cache key to force new artifacts
  • Logs store colored output now
  • Ansi-codes are stripped in non-TTY environments

The result of the last 3 bullets are a small perf gain since there is less work to be done when reading logs (colored prefixing isn't cheap).

@vercel
Copy link

vercel bot commented Dec 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/GW7eJaZrmhfqnrdbGd15wDyUxiof
✅ Preview: https://turbo-site-git-fix-hanging.vercel.sh

@jaredpalmer jaredpalmer merged commit f2c12d9 into main Dec 29, 2021
@jaredpalmer jaredpalmer deleted the fix/hanging branch December 29, 2021 22:52
sokra added a commit that referenced this pull request Oct 25, 2022
make ProcessEnv a trait to allow other implemenetations of it
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
make ProcessEnv a trait to allow other implemenetations of it
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
make ProcessEnv a trait to allow other implemenetations of it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook hangs when run from turbo
1 participant