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
PWA-2571: Regression fix disabled TTL support in BrowserPersistence #3729
Conversation
- Reverted ttl support for getItem
run all tests |
Successfully started codebuild job for the following test suites:
|
LogERROR ON TASK: lighthouseTests
|
|
run all tests |
Successfully started codebuild job for the following test suites:
|
run scaffold-pwa |
Successfully started codebuild job for |
run cypress |
Successfully started codebuild job for |
run cypress |
Successfully started codebuild job for |
run lighthouse-desktop |
Successfully started codebuild job for |
❓ Verify #3306. still works @michaelyu0123 Found one scenario where sensitive data is kept around, so some of this original bug may have resurfaced. Simulated a shopper returning to the site with an expired auth token in local storage (edit the ttl), |
@tjwiebell yes you are correct, it is mainly due to the reducer fetching the initial state call which also attempts to get the signin_token which removed the signin_token before user components useEffect has a chance to fetch it which in turn caused it to not run a async logout event that flushes customer information. I have modified the initial state fetching to just call the get item on signin_token with none ttl checking method to let the user component get a chance to handle it properly. Perhaps need a separate workflow for the login ttl in the future since it has to be handled differently. |
- Updated user reducers to not use the ttl checking getItem to let user component validate.
run all tests |
Successfully started codebuild job for the following test suites:
|
run lighthouse-mobile |
Successfully started codebuild job for |
✅ QA Passed Ready to merge after review of 0c7fd5c. |
run lighthouse-mobile |
Successfully started codebuild job for |
|
Description
Problem
A user auth bug was fixed in v11.0.0 regression, but it appears to have removed support for an important feature for TTL support of entries. While this may have solved the bug, this utility is public API, and anyone else who was using it expecting items to expire now have large stale caches for their shoppers.
Introduced by: https://github.com/magento/pwa-studio/pull/3306/files#diff-44b7b17ad1392c88b1e3411c80f7378782e6a568d280b68a48349061293b604cL51-L54
Acceptance Criteria
TTL is restored as supported in BrowserPersistence
No regressions related to the user auth bug this intended to fix
Related Issue
Closes #PWA-2571
Acceptance
Verification Stakeholders
Specification
Verification Steps
Test Execution
Verify #3306. still works
Verify TTL support works as expected. Browser stale cache should expire.
Verify above 2 scenarios in all supported browsers and devices.
Verify apollo does not store any sensitive data after user session logout
Verify above scenario in both DEfault. and French store
Cypress Test coverage -
Changes should be covered in unit test level. No cypress unless unit test does not support this kind of scenario to test.
Test scenario(s) for direct fix/feature
Test scenario(s) for any existing impacted features/areas
Test scenario(s) for any Magento Backend Supported Configurations
Is Browser/Device testing needed?
Any ad-hoc/edge case scenarios that need to be considered?
Screenshots / Screen Captures (if appropriate)
Breaking Changes (if any)
Checklist