Skip to content

Merging a PR is not an atomic action #21332

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

Closed
otbutz opened this issue Oct 4, 2022 · 0 comments · Fixed by #21401
Closed

Merging a PR is not an atomic action #21332

otbutz opened this issue Oct 4, 2022 · 0 comments · Fixed by #21401
Labels

Comments

@otbutz
Copy link

otbutz commented Oct 4, 2022

Description

If i close the browser tab right after hitting the "Merge" button, gitea merges the branch but fails to mark the PR as merged.

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Binary downloaded from Github and executed via systemd

Database

PostgreSQL

@otbutz otbutz added the type/bug label Oct 4, 2022
zeripath added a commit to zeripath/gitea that referenced this issue Oct 10, 2022
When merge was changed to run in the background context, the db updates
were still running in request context. This means that the merge could
be successful but the db not be updated.

This PR changes both these to run in the hammer context, this is not
complete rollback protection but it's much better.

Fix go-gitea#21332

Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick pushed a commit that referenced this issue Oct 11, 2022
When merge was changed to run in the background context, the db updates
were still running in request context. This means that the merge could
be successful but the db not be updated.

This PR changes both these to run in the hammer context, this is not
complete rollback protection but it's much better.

Fix #21332

Signed-off-by: Andrew Thornton <[email protected]>

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this issue Oct 11, 2022
Backport go-gitea#21401

When merge was changed to run in the background context, the db updates
were still running in request context. This means that the merge could
be successful but the db not be updated.

This PR changes both these to run in the hammer context, this is not
complete rollback protection but it's much better.

Fix go-gitea#21332

Signed-off-by: Andrew Thornton <[email protected]>
wxiaoguang pushed a commit that referenced this issue Oct 12, 2022
Backport #21401

When merge was changed to run in the background context, the db updates
were still running in request context. This means that the merge could
be successful but the db not be updated.

This PR changes both these to run in the hammer context, this is not
complete rollback protection but it's much better.

Fix #21332

Signed-off-by: Andrew Thornton <[email protected]>
tyroneyeh pushed a commit to tyroneyeh/gitea that referenced this issue Oct 24, 2022
…#21416)

Backport go-gitea#21401

When merge was changed to run in the background context, the db updates
were still running in request context. This means that the merge could
be successful but the db not be updated.

This PR changes both these to run in the hammer context, this is not
complete rollback protection but it's much better.

Fix go-gitea#21332

Signed-off-by: Andrew Thornton <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant