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

fix(twofactor): avoid DB error on Twofactor (en/dis)abled event #40472

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

Altahrim
Copy link
Collaborator

@Altahrim Altahrim commented Sep 18, 2023

Summary

With PostgreSQL, a transaction is aborted each time an error happen with the following message:

ERROR:  current transaction is aborted, commands ignored until end of transaction block

This PR avoid the error so the transaction can continue as expected.

Checklist

@Altahrim Altahrim added bug 2. developing Work in progress labels Sep 18, 2023
@Altahrim Altahrim self-assigned this Sep 18, 2023
@Altahrim Altahrim force-pushed the fix/aborted_pgsql_transaction_on_error branch 2 times, most recently from dd88e15 to 54c9cbe Compare September 25, 2023 07:12
@Altahrim Altahrim marked this pull request as ready for review September 25, 2023 07:42
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
@Altahrim Altahrim force-pushed the fix/aborted_pgsql_transaction_on_error branch from 54c9cbe to 4361019 Compare October 6, 2023 09:23
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

I'm very new to this approach but it seems reasonable

@Altahrim Altahrim added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Oct 6, 2023
@Altahrim
Copy link
Collaborator Author

Altahrim commented Oct 6, 2023

CI failure seems unrelated

@nickvergessen nickvergessen merged commit f84a93f into master Oct 9, 2023
38 checks passed
@nickvergessen nickvergessen deleted the fix/aborted_pgsql_transaction_on_error branch October 9, 2023 07:04
@nickvergessen
Copy link
Member

We are in freeze anyway, so you have to wait until friday

@Altahrim
Copy link
Collaborator Author

/backport to stable27

@Altahrim
Copy link
Collaborator Author

/backport to stable26

Altahrim added a commit that referenced this pull request Nov 15, 2023
…ransaction_on_error/stable27

[stable27] fix(twofactor): avoid DB error on Twofactor (en/dis)abled event #40472
@Altahrim Altahrim removed 4. to release Ready to be released and/or waiting for tests to finish backport-request labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants