Skip to content
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

Do not check if a page is saved if a user has no session header #2184

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

barrucadu
Copy link
Contributor

I spotted that the account-api was getting a lot of saved-page
queries in staging, which I tracked down to this: we're checking if
the page is saved even if the user has no session (which will always
fail). We can skip the API call in that case.

We had a similar issue once in the Transition Checker, where we were
trying to fetch saved results regardless of whether the user had a
session or not. Since this has come up twice now we should think
about how this problem can be solved generically. Maybe we could put
more logic in gds-api-adapters, for example?

I spotted that the account-api was getting a *lot* of saved-page
queries in staging, which I tracked down to this: we're checking if
the page is saved even if the user has no session (which will always
fail).  We can skip the API call in that case.

We had a similar issue once in the Transition Checker, where we were
trying to fetch saved results regardless of whether the user had a
session or not.  Since this has come up twice now we should think
about how this problem can be solved generically.  Maybe we could put
more logic in gds-api-adapters, for example?
@barrucadu barrucadu requested a review from danacotoran July 15, 2021 15:26
@bevanloon bevanloon temporarily deployed to government-f-msw-saved--erll7p July 15, 2021 15:26 Inactive
@barrucadu barrucadu merged commit c18e005 into main Jul 15, 2021
@barrucadu barrucadu deleted the msw/saved-page-no-header branch July 15, 2021 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants