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

chore: don't fail logout if cookie is not found #3871

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jonas-jonas
Copy link
Contributor

@jonas-jonas jonas-jonas commented Apr 15, 2024

This should deflake the CRDB tests, that sometimes fail on master. From what I can tell, the issue is that the cookie can be removed due to other means, which then results in repeated calls to logout failing. Unfortunately, it's pretty difficult to debug, why the cookie is removed in the first place. I am also unsure, why this only happens on CRDB (pretty consistently on CI).

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

Comment on lines +925 to +927
if (c) {
cy.clearCookie(c.name)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The end goal is to remove the cookie. If it doesn't exist in the first place, this action should not fail, IMO.

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure I understand this, however it is fine by me to change the check as long as we have the assertion after login. Can you confirm that we assert the cookie after successful login?

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.02%. Comparing base (386078e) to head (62d9709).
Report is 1 commits behind head on master.

❗ Current head 62d9709 differs from pull request most recent head b37e358. Consider uploading reports for the commit b37e358 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3871      +/-   ##
==========================================
+ Coverage   77.99%   78.02%   +0.02%     
==========================================
  Files         360      360              
  Lines       25198    25205       +7     
==========================================
+ Hits        19654    19665      +11     
+ Misses       4040     4035       -5     
- Partials     1504     1505       +1     

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

@jonas-jonas jonas-jonas marked this pull request as draft April 17, 2024 08:28
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.

None yet

4 participants