-
Notifications
You must be signed in to change notification settings - Fork 139
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
Theme Push: Change progress bar writestream to stderr #3765
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1659 tests passing in 769 suites. Report generated by 🧪jest coverage report action from ea177a1 |
This comment has been minimized.
This comment has been minimized.
db6e33c
to
b9090a9
Compare
b9090a9
to
ea177a1
Compare
if (tasks.length > 0) { | ||
await renderTasks(tasks, {renderOptions: {stdout: process.stderr}}) | ||
} | ||
} |
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.
Not sure where the best place to put this is - since many of our commands in the themes space are used in CI, we should probably use this by default rather than renderTasks
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.
I personally believe this should be the default options on CLI kit, but it's ok to restrict the scope of the change for now :)
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.
Thank you, @jamesmengo! LGTM 🚀
WHY are these changes introduced?
Addresses some of the issues raised in
theme push
#3734I think the DX for CI users could use some attention when resourcing allows (output logging, troubleshooting tips when flags are missing, etc)
For future contributors: I'm following Command Line Interface Guidelines here
WHAT is this pull request doing?
stderr
The Ink library used by CLI-kit writes this to
stdout
by default - this is causing the stream to get polluted, breaking operations such asshopify theme push --json | jq .
Risk: If someone is reading the values of
stderr
we may have just introduced a problem there instead. An alternative would be to write to a silent writestream instead - Example HereHow to test your changes?
Try running
pnpm shopify theme push --path <theme_path> --json | jq .
pnpm shopify theme push --path <theme_path> --json 1> stdout.txt 2> stderr.rtxt
Note: Don't test with the
--verbose
flag -outputDebug
writes everythingstdout
(for now). This will have to be addressed separately if it gets changedMeasuring impact
How do we know this change was effective? Please choose one:
Checklist
dev
ordeploy
have been reflected in the internal flowchart.