[BUG] - _xsrf
Cookie conflict error in JupyterHub token creation during tests
#2643
Labels
Milestone
_xsrf
Cookie conflict error in JupyterHub token creation during tests
#2643
Describe the bug
In our CI environment, we are encountering multiple test failures and errors related to creating tokens via the JupyterHub API.
This issue seems likely to come from the flakiness of the
_xsrf
token value in the final session requests, where it sometimes fails to update correctly. An incorrect cookie value can also be set (leading to a 403 unauthorized request), and a duplicate cookie with the same name might be generated for different paths (e.g.,/
and/hub/
), leading to arequests.cookies.CookieConflictError
.The primary function below is the central logic of this problem. A long-term solution would involve completely refactoring the authentication logic to eliminate reliance on cookies and instead depend entirely on the JupyterHub API endpoint. However, such a mechanism has yet to be supported. The solution implemented in #2554 is the best approach for managing this conflict at least for now:
nebari/tests/tests_deployment/utils.py
Lines 29 to 41 in 3caf45b
Expected behavior
OS and architecture in which you are running Nebari
Linux
How to Reproduce the problem?
Command output
No response
Versions and dependencies used.
No response
Compute environment
None
Integrations
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: