Skip to content

Caching of auth client regressed by #705 #822

@ofrobots

Description

@ofrobots

I believe that PR #705 regressed the earlier fix to cache the auth client I contributed in #661. This means that a new cache client is created on each API request we make, adding an unnecessary performance overhead. Here's some Cloud Trace output I get:

image

Note the extra 141ms added to this request, and every other request.

The cause is that the function makeAuthorizedRequest now passes a brand new object to util.makeRequest each time. We cache the authClient on that object, which is temporary and not available the next time through.

Would it be possible add a test for this to make sure this doesn't get regressed?

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions