Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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
Also, because we have a somewhat richer (and publicly documented)
While rereading this after receiving #451, I had a realization that did not occur to me at time of posting - namely, are there any downsides to switching to a deque, for the common case of not limiting buffer size? I.e. what do deques sacrifice vs lists?
Going by the 2.6 docs, the only downside seems to be that random access in the middle of the structure trends towards O(n), and nearly everything else (appends, pops, etc) is O(1) and/or otherwise an improvement over list performance.
So, sounds like the answer is "nope, deques are better in every way unless you're indexing into the middle", which is not necessary in this particular case (and by the time users get their paws on the result, we've concatenated it into a string anyways). But wanted to get this on record.
Note: this needs care when intersecting with the watchers functionality, since that API is "we give you the current, full copy of the capture buffer on each tick".
At the very least we just need a warning block reminding folks that if they configure a limited buffer, they will necessarily only get that buffer in their watchers, and will need to manually reconstruct the entire stream if that's what they really need. (Though this seems...to defeat the point...)