Skip to content

reloading the pull request creation page creates duplicate pull requests #20906

@earl-warren

Description

@earl-warren

Description

See https://gitea.com/gitea/go-sdk/pulls: there are two identical pull requests:

image

It happened while trying to submit a pull request while the gitea.com gateway was timeout (504 Gateway Time-out). Multiple requests were sent (reloading the URL creating the pull request with POST at https://gitea.com/gitea/go-sdk/compare/master...earl-warren/go-sdk:wip-issue-delete).

The final attempt showed a page explaining the pull request already exists:

image

But despite this safeguard two of the attempts raced against each other and created a duplicate. There is a race condition somewhere. An integration test trying to repeat these conditions would eventually run into this problem.

Gitea Version

dev

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

a

Screenshots

a

Git Version

a

Operating System

a

How are you running Gitea?

a

Database

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions