Repository navigation
Limit over run output - #1404
Conversation
If a submission writes a output line larger than the stream buffer size ( default 64k ) a LimitOverrunError will be raise. Rather than using readline(...) use readutil(....) and in the case of a overrun just return the current buffer, the rest of the line will be returned with the next read. Signed-off-by: Chris Harris <[email protected]>
Prevent LimitOverrunError with large output lines
Tested@cjh1 Thanks a lot for the change. when you don't have this change and you print the following in your ingestion or scoring program, your submission will be stuck in more_than_64k = "a" * 64000 + "BREAK_POINT" + "b" * 6000
print(more_than_64k)With this change from Chris compute worker will not crash and will return prints normally. |
|
Note for myself: need to update the compute worker docker image for testing and deployment. |
|
Updating all compute workers is needed to take this change into account. Are you using your own queue of compute workers?
|
Linked to #1351 from Chris
@ mention of reviewers
@ihsaan-ullah
A brief description of the purpose of the changes contained in this PR.
If a submission writes a output line larger than the stream buffer size ( default 64k ) a LimitOverrunError will be raise. Rather than using readline(...) use readutil(....) and in the case of a overrun just return the current buffer, the rest of the line will be returned with the next read.
A checklist for hand testing
Checklist