Investigate duplicate calls to user endpoint

Description

When using the user search it will result in multiple calls (per keystroke) to the user endpoint. This action should only result in one call to the endpoint.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Mike TaylorFebruary 3, 2017 at 5:30 PM

Having come this far, it seemed churlish not to go ahead and implement the proposed fix, so I did. This now works nicely – we issue only the GETs that we actually need.

Mike TaylorFebruary 3, 2017 at 3:08 PM

OK, that is a reasonable position. And it does make a lot of the other issues go away very conveniently.

Also, crucially: it is a fix at the level of the individual resource rather than the component (or even as, at present, the module). So when we have modules with multiple resources, we'll get a nice, fine grain of WSAPI calls.

Jason SkomorowskiFebruary 3, 2017 at 2:55 PM

Ultimately I was convinced we don't need the information about which particular sub-state the function used to generate the path because you can find out if it changed by generating the URL again. All having that would do is save the tiny bit of string manipulation it would take to get the URL at the cost of maintaining more code and module authors having to spell out what their resource-path-making-functions use.

So I'm satisfied the API contains enough info for our later optimising purposes.

A mechanism to force a refresh explicitly will still need to be, well, explicit, even if we have that information so I consider it an orthogonal question. Though related.

Mike TaylorFebruary 3, 2017 at 2:42 PM

Yes, we can handle this at lower levels. But I think it's inelegant to issue HTTP requests that you know a cache is going to handle.

And I am jumpy about just refusing to refresh from the same Okapi URL as last time, because what about when that is what you want to do? "I know this has changed because the bloke jjust sitting next to me added a user; refresh, please."

So I would rather handle it at a higher level if possible.

Jason SkomorowskiFebruary 3, 2017 at 2:40 PM

Heh, just saw your more recent comment when it appeared once I submitted mine. Do you think comparing the output of substitution to that generated on the prior run will suffice?

Done

Details

Assignee

Reporter

Labels

Priority

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 19, 2017 at 9:05 PM
Updated February 21, 2017 at 9:58 PM
Resolved February 3, 2017 at 5:30 PM
TestRail: Cases
TestRail: Runs