Skip to content

Fix RST rendering not working for large files

Stan Hu requested to merge sh-fix-stdout-hang-rst into master

To render RST files, this gem spawns a python3 process via Popen.open3. If the stdout buffer exceeded the maximum size, the pipe would be filled, causing a 60-second timeout on the backend. Since Open3.capture3 spawns separate threads to read stdout and stderr (https://github.com/ruby/ruby/blob/1ec544695fa02d714180ef9c34e755027b6a2103/lib/open3.rb#L257-L273), we can use that and clean up the implementation quite a bit.

This will address gitlab#13244 (closed).

Edited by Stan Hu

Merge request reports