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

Debounce checkLoginState (testing reliability) #9012

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

fuzeman
Copy link
Contributor

@fuzeman fuzeman commented Feb 2, 2025

Had a closer look at the issue I was experiencing with tests stalling in #8992 and tracked it down to a redirection issue during login. I'm not sure if this is the best way to go about fixing this issue, ideally fixing this without a time delay would probably be better. Let me know what you think.

As displayed in the screenshots below: two checkLoginState calls are being fired as of 1b5019b, this can intermittently cause an unexpected redirection back to /home after playwright has clicked a tab on the header which in-turn stalls the test until timeout.


master / 1b5019b (test successful)

2025-02-02 23_45_51-DevTools - localhost_5173_platform_home

master / 1b5019b (test stalled)

2025-02-02 23_44_44-DevTools - localhost_5173_platform_home


PR / c180469 (test successful)

2025-02-02 23_53_26-DevTools - localhost_5173_platform_home

Copy link

netlify bot commented Feb 2, 2025

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit c180469
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/679f5412872fee000812f406
😎 Deploy Preview https://deploy-preview-9012--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.50%. Comparing base (1b5019b) to head (c180469).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9012      +/-   ##
==========================================
- Coverage   85.55%   85.50%   -0.05%     
==========================================
  Files        1177     1177              
  Lines       52014    52015       +1     
  Branches     2114     2114              
==========================================
- Hits        44502    44478      -24     
- Misses       6978     7004      +26     
+ Partials      534      533       -1     
Flag Coverage Δ
pui 68.90% <100.00%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SchrodingersGat
Copy link
Member

@fuzeman thanks for looking into this, I really appreciate it. The fix looks pretty clean to me, and having tested it locally it does appear to be more "stable". Fingers crossed that this addresses a good part of our race condition related issues!

@matmair @wolflu05 any thoughts on this one before merge?

@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed refactor User Interface Related to the frontend / User Interface labels Feb 2, 2025
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Feb 2, 2025
@SchrodingersGat SchrodingersGat added backport Apply this label to a PR to enable auto-backport action backport-to-0.17.x Backport these changes to the 0.17.x branch labels Feb 2, 2025
@SchrodingersGat SchrodingersGat merged commit e93b969 into inventree:master Feb 2, 2025
32 checks passed
@SchrodingersGat
Copy link
Member

@fuzeman thanks for the contribution 😁

github-actions bot pushed a commit that referenced this pull request Feb 2, 2025
Copy link
Contributor

github-actions bot commented Feb 2, 2025

💚 All backports created successfully

Status Branch Result
0.17.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat pushed a commit that referenced this pull request Feb 2, 2025
…esting (#9012) (#9016)

(cherry picked from commit e93b969)

Co-authored-by: Dean <me@dgardiner.net>
@fuzeman
Copy link
Contributor Author

fuzeman commented Feb 2, 2025

I'll take a look at the other playwright test failures as well. I noticed some test failures had 401 Unauthorized ("Invalid token.") logged in the console, not sure if that's relevant yet though.

@matmair
Copy link
Member

matmair commented Feb 3, 2025

@fuzeman that is normal for some runs (login tests for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Apply this label to a PR to enable auto-backport action backport-to-0.17.x Backport these changes to the 0.17.x branch bug Identifies a bug which needs to be addressed refactor User Interface Related to the frontend / User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants