You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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).
The text was updated successfully, but these errors were encountered: