Skip to content
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

Better handle large execution results and large datasets #867

Open
Kami opened this issue Mar 14, 2021 · 1 comment
Open

Better handle large execution results and large datasets #867

Kami opened this issue Mar 14, 2021 · 1 comment

Comments

@Kami
Copy link
Member

Kami commented Mar 14, 2021

We should update st2web to be smarter and better handle executions with large results.

Right now if the execution which is loaded (e.g. either user clicks on it in the history / dashboard page or it's the last execution which result and details are automatically loaded when the page loads) contains large result field, the whole browser window / tab will freeze.

We should handle such scenarios better.

Background, Context

For a long time, working with large executions and result has been StackStorm's weak point.

StackStorm/st2#4846 mostly mitigates and solves that for the server-side, but now the issue will be more pronounced on the client (st2web) side.

Possible Improvements

There are many ways to improve on the status quo.

For one, we should not be automatically loading large results and passing them through the code highlighter widget.

We could do something similar to what various CI systems do (think Circle CI, Github actions, etc.) which display "View raw logs" tab which opens a new window with the raw output or offers a way to download the output as file.

We could add some additional logic to the api to return result_size (or similar field) with each execution object and then inside the st2web we could check if that size is over some threshold (e.g. 100 KB). If it is, instead of trying to display the result and using code highlighting widget on it, we should display something along the lines of "This execution result is too large to be displayed here. Click to view raw execution result or to download raw execution result".

IIRC, we already have "raw action result / attribute value" API endpoint so we could simply use that one for the link target (and if we don't adding one should be straight forward - that endpoint should just return raw result as string without doing any JSON loading).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants