-
-
Notifications
You must be signed in to change notification settings - Fork 758
Various v2.9.0 changes #4337
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
Various v2.9.0 changes #4337
Changes from 4 commits
4e188f9
6804540
b4e6603
746adf7
bcb63f5
fcb60ef
7d070d8
9175ca9
b9c6525
535f620
dda100b
aa4e4ad
f544d56
f32d727
2007740
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,6 @@ def _get_one(action_id, requester_user): | |
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']) | ||
|
||
permission_type = PermissionType.ACTION_VIEW | ||
rbac_utils.assert_user_has_resource_db_permission(user_db=requester_user, | ||
|
@@ -144,6 +143,9 @@ def get_all(self, exclude_attributes=None, include_attributes=None, sort=None, o | |
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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). |
||
# actions | ||
# Refactor it to perform 2 queries instead | ||
result.append(self._transform_action_api(action_api=action_api, | ||
requester_user=requester_user)) | ||
resp.json = result | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,7 +110,7 @@ def mask_secrets(self, value): | |
parameters.update(value.get('runner', {}).get('runner_parameters', {})) | ||
|
||
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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noticed this issue while testing WebUI changes. |
||
secret_parameters=secret_parameters) | ||
|
||
if 'parameters' in liveaction: | ||
|
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.
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
.