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

Minor tweaks and improvements when recording process events #139

Merged
merged 4 commits into from
Nov 17, 2024

Conversation

kylewlacy
Copy link
Member

This PR is a followup to the new "process event" format introduced in #138

After merging #138, I found that processes that save large output ended up not writing correctly. I narrowed it down to either a bug or quirk in how zstd-seekable works, where it wasn't clear to me how to get it to fully flush its output. This led me to revisit some parts of the process events feature:

  • Migrate from zstd-seekable crate to zstd-framed (a new crate I just published). This also let me remove all the custom zstd types (and tests) from Brioche, since that's now all covered by zstd-framed
  • Implement "clean shutdown" when writing process events. Pressing Ctrl-C now uses a CancellationToken and a TaskTracker to ensure (some) tasks fully shut down before exiting. For now, only tasks that write process events use this mechanism.
  • Tweak the ProcessEvent types to no longer use Cow<_>. Since process events are now written in a different task, this forced all uses to be Cow<'static, _>, so just using owned types instead simplified things.

@kylewlacy kylewlacy merged commit 4767f23 into main Nov 17, 2024
5 checks passed
@kylewlacy kylewlacy deleted the process-event-fixes branch November 17, 2024 20:53
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.

1 participant