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

wrapper: Write stdout/stderr data to stream when received #410

Merged
merged 6 commits into from
May 7, 2024

Conversation

austinvalle
Copy link
Member

@austinvalle austinvalle commented Apr 25, 2024

Closes #395
Closes #405

This PR restores the equivalent of the wrapper's original behavior to immediately output to STDOUT and STDERR when data is received. I've attached a demo video of the new delayed test.

Context

Prior to #367, we relied on the @actions/exec package to immediately write to STDOUT and STDERR (which is the default behavior of silent: false), see the relevant underlying code.

Since we can't utilize the @actions/exec package's default behavior, due to the debug/command output being passed to the wrapper (actions/toolkit#649), we can just update our original listener to just write the data as it's being buffered. Shout out to @dannystaple for the original thought!

Demo

streaming-output.mov

@austinvalle austinvalle marked this pull request as ready for review April 25, 2024 15:00
@austinvalle austinvalle requested a review from a team as a code owner April 25, 2024 15:00
@austinvalle austinvalle added the bug Something isn't working label Apr 25, 2024
@austinvalle austinvalle added this to the v3.1.1 milestone Apr 25, 2024
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (with my limited understanding of this part of NodeJS) 🚀

@austinvalle austinvalle merged commit 99441ec into main May 7, 2024
69 checks passed
@austinvalle austinvalle deleted the av/fix-wrapper-listener branch May 7, 2024 13:51
Copy link

github-actions bot commented Jun 8, 2024

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 contributions.
If you have 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
4 participants