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
[FW][FIX] auth_ldap: LDAP login fails if it creates a new user. #163645
Closed
fw-bot
wants to merge
3
commits into
odoo:saas-17.1
from
odoo-dev:saas-17.1-16.0-fix-ldap-create-user-fzd7-fw
Closed
[FW][FIX] auth_ldap: LDAP login fails if it creates a new user. #163645
fw-bot
wants to merge
3
commits into
odoo:saas-17.1
from
odoo-dev:saas-17.1-16.0-fix-ldap-create-user-fzd7-fw
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
This was referenced Apr 26, 2024
fw-bot
force-pushed
the
saas-17.1-16.0-fix-ldap-create-user-fzd7-fw
branch
from
May 2, 2024 09:28
dc18f91
to
9ca7d75
Compare
C3POdoo
requested review from
a team,
HydrionBurst,
ryv-odoo and
Julien00859
and removed request for
a team
May 2, 2024 09:31
fw-bot
force-pushed
the
saas-17.1-16.0-fix-ldap-create-user-fzd7-fw
branch
from
May 2, 2024 11:04
9ca7d75
to
bc63293
Compare
Steps: - Set up LDAP authentication with Create User enabled and a Template User set - Log in with an LDAP identity that doesn't have an account yet Get odoo.exceptions.MissingError: Record does not exist or has been deleted See odoo#41060 X-original-commit: 524ab56
This commit adds a test to the auth_ldap module to verify the user registration functionality. The test ensures that users can be successfully registered through LDAP authentication. task-3879911 X-original-commit: 3812822
While running the test tagged as `database_breaking:TestAuthLDAP.test_auth_ldap`, we need to send a HTTP request in order to retrieve a CSRF token to be able to authenticate our mock user. This request creates a new thread that attempts to establish a registry. However, a deadlock occurs due to an RLock already held by the main test thread on the Registry class. This lock prevents the new thread from acquiring it, causing the test to hang. This lock was introduced in master in PR odoo#161438, that PR is ultimately going to be backport in saas-16.3. Mocking the lock while setting up the test should resolve this issue (similar behavior as HttpCase/enter_test_mode is doing). X-original-commit: b32fe5e
fw-bot
force-pushed
the
saas-17.1-16.0-fix-ldap-create-user-fzd7-fw
branch
from
May 2, 2024 11:19
bc63293
to
95782e4
Compare
@Julien00859 you may want to rebuild or fix this PR as it has failed CI. |
robodoo
pushed a commit
that referenced
this pull request
May 2, 2024
While running the test tagged as `database_breaking:TestAuthLDAP.test_auth_ldap`, we need to send a HTTP request in order to retrieve a CSRF token to be able to authenticate our mock user. This request creates a new thread that attempts to establish a registry. However, a deadlock occurs due to an RLock already held by the main test thread on the Registry class. This lock prevents the new thread from acquiring it, causing the test to hang. This lock was introduced in master in PR #161438, that PR is ultimately going to be backport in saas-16.3. Mocking the lock while setting up the test should resolve this issue (similar behavior as HttpCase/enter_test_mode is doing). closes #163645 X-original-commit: b32fe5e Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
May 2, 2024
While running the test tagged as `database_breaking:TestAuthLDAP.test_auth_ldap`, we need to send a HTTP request in order to retrieve a CSRF token to be able to authenticate our mock user. This request creates a new thread that attempts to establish a registry. However, a deadlock occurs due to an RLock already held by the main test thread on the Registry class. This lock prevents the new thread from acquiring it, causing the test to hang. This lock was introduced in master in PR #161438, that PR is ultimately going to be backport in saas-16.3. Mocking the lock while setting up the test should resolve this issue (similar behavior as HttpCase/enter_test_mode is doing). closes #163645 X-original-commit: b32fe5e Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Steps:
Get
odoo.exceptions.MissingError: Record does not exist or has been deleted
See #41060
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #162456