Description
This is Invoke's version of fabric/fabric#800. tl;dr allow limiting the stdout/err captured, for users who a) experience severe mismatches between the size of their subprocess' output streams and their system's available memory; and b) don't need to examine that output in whole afterwards.
Unlike the notes at the bottom of that ticket, where we're using Fabric 1's RingBuffer, here in Invoke land we can just use collections.deque(xxx, maxlen=yyy).
Also, because we have a somewhat richer (and publicly documented) Result class, we can (and should) add a flag to Result noting when the ring buffer is being limited, so users have at least a little warning when shooting themselves in the foot ("hey, I turned on this memory saving feature I saw on StackOverflow, but now I only see the last 1024 bytes of stdout!")
Specific TODO
Description
This is Invoke's version of fabric/fabric#800. tl;dr allow limiting the stdout/err captured, for users who a) experience severe mismatches between the size of their subprocess' output streams and their system's available memory; and b) don't need to examine that output in whole afterwards.
Unlike the notes at the bottom of that ticket, where we're using Fabric 1's
RingBuffer, here in Invoke land we can just usecollections.deque(xxx, maxlen=yyy).Also, because we have a somewhat richer (and publicly documented)
Resultclass, we can (and should) add a flag toResultnoting when the ring buffer is being limited, so users have at least a little warning when shooting themselves in the foot ("hey, I turned on this memory saving feature I saw on StackOverflow, but now I only see the last 1024 bytes of stdout!")Specific TODO
dequeobjectscapture_buffer_size(or similarly named) optionmaxlenfor thedeque