manageiq-api icon indicating copy to clipboard operation
manageiq-api copied to clipboard

User/Role/Feature lookup improvements

Open NickLaMuro opened this issue 5 years ago • 13 comments

Requires https://github.com/ManageIQ/manageiq/pull/20506

Makes use of new scopes to improve the number of queries required for login and even regular requests (though, the latter is less significant).

Also avoids some duplicate User lookups on login.

Benchmarks

Note: Improvements are in number of queries.

Before

$ bundle exec miqperf benchmark -ac2 "/api/users"
$ bundle exec miqperf report --last
/api/auth
|   ms | queries | query (ms) | rows |
| ---: |    ---: |       ---: | ---: |
| 5088 |      26 |        183 |   10 |
/api/users
|   ms | queries | query (ms) | rows |
| ---: |    ---: |       ---: | ---: |
|  267 |      12 |         13 | 1494 |
|   17 |      10 |        3.9 |   12 |

After

$ bundle exec miqperf benchmark -ac2 "/api/users"
$ bundle exec miqperf report --last
/api/auth
|   ms | queries | query (ms) | rows |
| ---: |    ---: |       ---: | ---: |
| 4949 |      12 |        181 |    1 |
/api/users
|   ms | queries | query (ms) | rows |
| ---: |    ---: |       ---: | ---: |
|  258 |       7 |         12 | 1489 |
|   15 |       5 |        3.3 |    7 |

Links

  • https://github.com/ManageIQ/manageiq/pull/20506
  • More improvements as part of this effort: https://github.com/ManageIQ/manageiq-api/issues/880

NickLaMuro avatar Sep 01 '20 01:09 NickLaMuro

Looks like I have a lot of broken tests to fix... I will look into that today.

Edit: Actually, this needs a cross repo test for this to function, so will work on that at some point.

NickLaMuro avatar Sep 02 '20 17:09 NickLaMuro

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s)

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot avatar Feb 27 '23 00:02 miq-bot

This pull request has been automatically closed because it has not been updated for at least 3 months.

Feel free to reopen this pull request if these changes are still valid.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot avatar May 29 '23 00:05 miq-bot

cc @kbrock

Fryguy avatar Jul 27 '23 15:07 Fryguy

Checked commits https://github.com/NickLaMuro/manageiq-api/compare/d1c9e09cfd487cb93be6bf4ad7f01b3ba9d9e827~...db287afeddc70c015e22295c5b77a99bb9d6e3b8 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint 4 files checked, 1 offense detected

app/controllers/api/base_controller/authentication.rb

miq-bot avatar Jul 27 '23 15:07 miq-bot

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s)

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot avatar Oct 30 '23 00:10 miq-bot

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

miq-bot avatar Feb 05 '24 00:02 miq-bot

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

miq-bot avatar May 06 '24 00:05 miq-bot

This pull request has been automatically marked as stale because it has not been updated for at least 3 months.

If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).

miq-bot avatar Aug 12 '24 00:08 miq-bot