Fix cat empty file (issue #510)#517
Conversation
6cba0b1 to
85113bb
Compare
jonasbardino
left a comment
There was a problem hiding this comment.
I think this fix needs core adjustments and thorough testing in actual deployment. In that relation please also remember that the file_format function and output_format of file is not just used in cat.py but also e.g. in showfreezefile.py and showvgridprivatefile.py in addition to head.py and tail.py.
The added unit test appears to only cover the specific plain text error case and AFAICT none of the tests cover the important default case of serving binary data for file output. I would consider that an essential addition to avoid regressions in the basic use cases.
Ok, I was hoping to iterate upon it off the back of your feedback. Perhaps this should have been a draft, but wasn’t sure it’d then get looked over. Feel I need to stress I was just tying to help here. I have reworked this based on a pre-existing |
Address attempting to concatenate strings to a an empty byte string in the file_format output func. The added tests here make use of changes to migwsgi that make it possible to exercise the entire output path. Bring those changes over because having to write them again has no benefit.
85113bb to
7df58e0
Compare
Help is welcome of course. Yet, when I find a PR with a title of 'Fix something' with no markers or mention of it being work-in-progress or not fully tested, it's very difficult not to expect it to be merge-ready. PR titles and Descriptions are usually helpful to clarify what to expect. |
...
I have a bunch of other matters to tend to now but will return to have a look next time I can find some time. In the meantime I'd urge you to look into signing of your git commits (see our internal wiki) and proceed with the mandatory deployment testing. |
|
It was not my intention to cause frustration with this work. I don't think I currently have the bandwidth for this either when also taking care of the large active review, thus I will at minimum drop this to a draft and pick this up when I have more spare capacity. |
Address attempting to concatenate strings to a an empty byte string in the file_format output function.
The added tests here make use of changes to migwsgi that make it possible to exercise the entire output path. Bring those changes over because having to write them again has no benefit.