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

Fixed unnecessary entries in table api-session when using insta-login in API calls #3477

Merged
merged 6 commits into from
Sep 5, 2023

Conversation

kiatng
Copy link
Collaborator

@kiatng kiatng commented Aug 30, 2023

…in in API calls.

Description (*)

The API session has default expiry of 3600 secs from the time of the last API call. This expiry is managed in the table api_asession. With the introduction of insta-login in PR #3443, the session expiry become irrelevant. This PR bypassed adding entries to the various api tables. In my test, this saves 10 to 20 mini-seconds to insta-login.

Related Pull Requests

PR #3443

Fixed Issues (if relevant)

Partially fixed issue #3449.

Manual testing scenarios (*)

  1. No new entries are added in the table api_asession with insta-login.
  2. Normal entries are added in the table api_asession with "normal" login.

@github-actions github-actions bot added the Component: Api PageRelates to Mage_Api label Aug 30, 2023
Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@fballiano
Copy link
Contributor

we can remove a line from the phpstan baseline in order to fix the workflow

@kiatng
Copy link
Collaborator Author

kiatng commented Aug 30, 2023

I don't understand why PHPStan is complaining the deleted function protected function _isSessionExpired(). What am I missing?

@fballiano
Copy link
Contributor

it says that we've to remove that line from the baseline, since it's not triggering an error anymore

Co-authored-by: Mohamed ELIDRISSI <67818913+elidrissidev@users.noreply.github.com>
@fballiano fballiano changed the title Fixed unnecessary entries in table api-session when using insta-log… Fixed unnecessary entries in table api-session when using insta-login in API calls Sep 5, 2023
@fballiano fballiano merged commit 0f032f3 into OpenMage:main Sep 5, 2023
15 checks passed
@kiatng kiatng deleted the improved_instalogin branch September 5, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Api PageRelates to Mage_Api phpstan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants