Repository navigation
Various v2.9.0 changes - #4337
Conversation
overhead if there are many actions in the db.
|
|
||
| secret_parameters = get_secret_parameters(parameters=parameters) | ||
| result['parameters'] = mask_secret_parameters(parameters=result['parameters'], | ||
| result['parameters'] = mask_secret_parameters(parameters=result.get('parameters', {}), |
There was a problem hiding this comment.
Noticed this issue while testing WebUI changes.
| GET /actions/views/parameters/1 | ||
| """ | ||
| action_db = LookupUtils._get_action_by_id(action_id) | ||
| LOG.info('Found action: %s, runner: %s', action_db, action_db.runner_type['name']) |
There was a problem hiding this comment.
This reduces duration of this request for 10 seconds where there are many actions in the database.
There is no need to log this, especially under INFO.
| result = [] | ||
| for item in resp.json: | ||
| action_api = ActionAPI(**item) | ||
| # TODO: This is extreme inefficient and results in N * 2 queries where N is number of |
There was a problem hiding this comment.
This is simply horrible, with aws and some other packs API endpoint takes 30+ seconds to return (well, now 10 seconds less with logging fix, but still too long).
We now make 2 instead of N * 2 queries which results in a massive speed up.
|
Changes in bcb63f5 and 7d070d8 substantially improve performance of It changes the code to perform 1 database query instead of Having said that, 6 is still too long, imo (especially, since it was faster in the previous release). The main problem is that in the new WebUI "Rules" tab / app now depends on this API endpoint. @enykeev Can we some how get rid of request to this API endpoint all together in the new rules tab? Or can we replace it with a call to some other (faster) API endpoint? EDIT: If we need to retrieve action parameters for that app / view, there is not much we can do with the existing endpoints (even |
|
Adding to my comment above - another option to provide a better WebUI rules tab user experience would be delay loading action parameters and display rules immediately on the page once rules are loaded and full in action parameters loaded once action data is loaded from that API endpoint. This would provide a much better user-experience - current approach with page being "white" aka not-rendered / empty until actions overview API endpoint loads is very not friendly for installations with a lot of actions. /cc @enykeev |
/v1/executions/{id}, etc.
Submitting metrics for those unique endpoints would result in a lot of
unique metrics which is an anti-pattern and results on unnecessary high
metrics server load.
don't result in unique metric names and don't cause any load issues.
Trying to get StackStorm/st2web#605 finished so we can include at least one directly user-visible performance improvement.
Changes
GET /v1/executionsAPI endpoint - sometimesparametersfield can be NoneGET/v1/actions/overviewAPI endpoint - performance improvementsN * 2to2