New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
truncate execution output in default view #1025
truncate execution output in default view #1025
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay @fopina LGTM thanks!
Forgot to mention in the review: could you add tests to the new features in api.go? |
this is one of the original notes I left in the PR text :) I didn't write the tests as I wasn't sure if the API would remain as it, due to my other notes which are highlighting parts I don't like in the PR. But also had a note for the way |
Ah, indeed. I missed that, sorry!
I can't provide any hints on doing this off the top of my head, I would need to look into that just like you. |
75ac753
to
62a96b5
Compare
Co-authored-by: Victor Castell <victor@victorcastell.com>
14b8693
to
341fa04
Compare
addressed all reviews and also included the test 🎉 |
@yvanoers any chance this can be merged? |
Have seen your comment - will get back to you. |
@yvanoers :) |
Yes, sorry, have a lot on my plate atm. |
no worries, I ping just to remind not to complain. made commits to address the two comments, let me know if you agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stamp of approval!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
maxBufSize = 256000
in the shell handler, 100 executions per job, 25M to download when listing executions (and added browser rendering time)The idea of this PR is to add an API parameter to truncate execution output but leave default to not truncate and avoid API breaking changes.
Then update UI to load list truncated but allow individual executions to have output fully loaded.
test
Create job with shell command
seq 1000000
(seq 1000000 | wc -c
=6888894
)Run it 100+ times:
Notes
Some parts pending re-design as I'm a complete react ignorant:
output_size
was added to dataprovider though it doesn't look correct there - how to send extra query param (output_size
) from the ReferenceManyField component without modifying dataprovider? Or modifying it in a more generic way that makes sense to other components/resourcesSpecialOutputPanel
hammered in to have theload full output
button, any suggestion for better UI/code? also need(should?) hide button if output is not truncated