Bug #84540
sur une connexion oidc, TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block
Début:
11 décembre 2023
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/117287/
OIDCAccount.DoesNotExist: OIDCAccount matching query does not exist. File "django/db/models/query.py", line 581, in get_or_create return self.get(**kwargs), False File "django/db/models/query.py", line 435, in get raise self.model.DoesNotExist( UniqueViolation: duplicate key value violates unique constraint "authentic2_auth_oidc_oidcaccount_user_id_key" DETAIL: Key (user_id)=(81) already exists. File "django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) IntegrityError: duplicate key value violates unique constraint "authentic2_auth_oidc_oidcaccount_user_id_key" DETAIL: Key (user_id)=(81) already exists. (12 additional frame(s) were not displayed) ... File "django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block. (25 additional frame(s) were not displayed) ... File "django/db/backends/utils.py", line 98, in execute return super().execute(sql, params) File "django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "django/db/backends/utils.py", line 78, in _execute self.db.validate_no_broken_transaction() File "django/db/backends/base/base.py", line 447, in validate_no_broken_transaction raise TransactionManagementError(
Révisions associées
Historique
Mis à jour par Robot Gitea il y a 5 mois
- Statut changé de Nouveau à En cours
Benjamin Dauvergne (bdauvergne) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/authentic/pulls/211
- Titre : WIP: auth_oidc: do not use logging inside a failed transaction (#84540)
- Modifications : https://git.entrouvert.org/entrouvert/authentic/pulls/211/files
Mis à jour par Robot Gitea il y a 3 mois
- Statut changé de Solution proposée à Solution validée
Corentin Sechet (csechet) a approuvé une pull request sur Gitea concernant cette demande :
Mis à jour par Robot Gitea il y a 3 mois
- Statut changé de Solution validée à Résolu (à déployer)
Benjamin Dauvergne (bdauvergne) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://git.entrouvert.org/entrouvert/authentic/pulls/211
- Titre : auth_oidc: do not use logging inside a failed transaction (#84540)
- Modifications : https://git.entrouvert.org/entrouvert/authentic/pulls/211/files
Mis à jour par Transition automatique il y a 3 mois
- Statut changé de Résolu (à déployer) à Solution déployée
auth_oidc: do not use logging inside a failed transaction (#84540)