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: Introducing... TailPipe! #29

Merged
merged 25 commits into from
May 14, 2024
Merged

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented May 9, 2024

TailPipe is nearly a drop-in replacement for TeeStream, but rather than "splitting the stream" we "tail -f" the stdout and stderr files as they are written.

BUG: should be streaming stdout and stderr, but instead we don't get output until the process ends.

Fixes: #27
Fixes #26
Fixes #25
Fixes #21
Fixes #10

@asmacdo asmacdo changed the title Introduce TailPipe POC Introduce TailPipe May 10, 2024
@asmacdo asmacdo marked this pull request as ready for review May 10, 2024 02:57
@asmacdo
Copy link
Member Author

asmacdo commented May 10, 2024

Fixes: #27
Fixes: #26
Fixes: #25
Fixes: #21

@asmacdo asmacdo added the semver-patch Increment the patch version when merged label May 10, 2024
@asmacdo asmacdo changed the title Introduce TailPipe Refactor: Introducing... TailPipe! May 10, 2024
@yarikoptic
Copy link
Member

BUG: should be streaming stdout and stderr, but instead we don't get output until the process ends.

It might be a show stopper to the approach. Did you check if you could somehow tune up flushing or buffering behavior for those opened file(s) to ensure that stuff is dumped quickly after it is output by the process? or could you just check if that is the case and may be the reading process just is not informed/can't read it for some time/some reason?

@asmacdo
Copy link
Member Author

asmacdo commented May 10, 2024

BUG: should be streaming stdout and stderr, but instead we don't get output until the process ends.

Fixed-- I was using write without flush to see what happens ;)

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 67.92453% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 47.97%. Comparing base (acd04d4) to head (d32a0ff).

❗ Current head d32a0ff differs from pull request most recent head d9c3622. Consider uploading reports for the commit d9c3622 to get more accurate results

Files Patch % Lines
src/duct.py 67.92% 17 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #29       +/-   ##
===========================================
+ Coverage   36.36%   47.97%   +11.61%     
===========================================
  Files           1        1               
  Lines         187      198       +11     
  Branches       32       33        +1     
===========================================
+ Hits           68       95       +27     
+ Misses        117      101       -16     
  Partials        2        2               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asmacdo
Copy link
Member Author

asmacdo commented May 14, 2024

Fixes: #10

@yarikoptic yarikoptic merged commit 090b4f0 into con:main May 14, 2024
9 checks passed
@asmacdo asmacdo deleted the tee-to-tail branch October 4, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment