Two PRs are created when using link from Git CLI #9189

Closed
opened 2025-11-02 08:31:52 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @penguineer on GitHub (Jul 6, 2022).

Description

This bug is a bit annoying, because it is hard to reproduce, but it happened multiple times by now. Steps:

  1. Create a branch with commits.
  2. Push branch to origin via git push -u origin branchname
  3. Use the link provided in the push response to create a PR.
  4. Create the PR from the Web UI.

Sometimes this results in two PRs with the same data (but distinct numbers) being created. I have verified that these are treated as individual PRs by individually changing their meta-data. There is only one branch that both PRs share.

Unfortunately this is hard to reproduce, but it happens to often to ignore (especially since closing the 2nd PR also wants to delete the branch).

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

Activating debug logs on the prod server creates a log of logging output. I am happy to follow hints on how to get the right logs efficiently.

Screenshots

No response

Git Version

From the Docker image.

Operating System

Docker running on Debian Bullseye.

How are you running Gitea?

We use the Docker image gitea/gitea:1.16.8 and set up our container via Ansible:

  - name: Setup the docker container for gitea
    docker_container:
      name: gitea
      image: "gitea/gitea:1.16.8"
      pull: true
      state: started
      restart_policy: unless-stopped
      detach: yes
      ports:
      - 127.0.0.1:9002:3000
      - 2222:2222
      env:
        APP_NAME="…"
        RUN_MODE="prod"
        SSH_DOMAIN="…"
        SSH_PORT="2222"
        SSH_START_SERVER="false"
        ROOT_URL="https://gitea.…"
        DISABLE_REGISTRATION="true"
        USER_UID=1000
        USER_GID=1000
      volumes:
      - "/srv/docker/gitea:/data:rw"

Database

SQLite

Originally created by @penguineer on GitHub (Jul 6, 2022). ### Description This bug is a bit annoying, because it is hard to reproduce, but it happened multiple times by now. Steps: 1. Create a branch with commits. 2. Push branch to origin via `git push -u origin branchname` 3. Use the link provided in the push response to create a PR. 4. Create the PR from the Web UI. Sometimes this results in *two* PRs with the same data (but distinct numbers) being created. I have verified that these are treated as individual PRs by individually changing their meta-data. There is only one branch that both PRs share. Unfortunately this is hard to reproduce, but it happens to often to ignore (especially since closing the 2nd PR also wants to delete the branch). ### Gitea Version 1.16.8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist Activating debug logs on the prod server creates a log of logging output. I am happy to follow hints on how to get the right logs efficiently. ### Screenshots _No response_ ### Git Version From the Docker image. ### Operating System Docker running on Debian Bullseye. ### How are you running Gitea? We use the Docker image `gitea/gitea:1.16.8` and set up our container via Ansible: ```yaml - name: Setup the docker container for gitea docker_container: name: gitea image: "gitea/gitea:1.16.8" pull: true state: started restart_policy: unless-stopped detach: yes ports: - 127.0.0.1:9002:3000 - 2222:2222 env: APP_NAME="…" RUN_MODE="prod" SSH_DOMAIN="…" SSH_PORT="2222" SSH_START_SERVER="false" ROOT_URL="https://gitea.…" DISABLE_REGISTRATION="true" USER_UID=1000 USER_GID=1000 volumes: - "/srv/docker/gitea:/data:rw" ``` ### Database SQLite
GiteaMirror added the type/bugissue/duplicate labels 2025-11-02 08:31:52 -06:00
Author
Owner

@jolheiser commented on GitHub (Jul 6, 2022):

I suspect this isn't because of the link, but because of https://github.com/go-gitea/gitea/issues/17111 in general.
Closing as duplicate.
If you feel there is more to it, feel free to re-open or jump in Discord/Discourse/Matrix for a chat. 🙂

@jolheiser commented on GitHub (Jul 6, 2022): I suspect this isn't because of the link, but because of https://github.com/go-gitea/gitea/issues/17111 in general. Closing as duplicate. If you feel there is more to it, feel free to re-open or jump in Discord/Discourse/Matrix for a chat. 🙂
Author
Owner

@penguineer commented on GitHub (Jul 7, 2022):

Thanks for the quick response!
This might especially be related to #17254 - I keep an eye on that behavior.

@penguineer commented on GitHub (Jul 7, 2022): Thanks for the quick response! This might especially be related to #17254 - I keep an eye on that behavior.
Author
Owner

@penguineer commented on GitHub (Jul 12, 2022):

@jolheiser In #17111 rapid/repeated clicking is mentioned, but I have observed the same behavior with one careful single button click. It seems that the event is duplicated somewhere during processing (race condition)?

@penguineer commented on GitHub (Jul 12, 2022): @jolheiser In #17111 rapid/repeated clicking is mentioned, but I have observed the same behavior with one careful single button click. It seems that the event is duplicated somewhere during processing (race condition)?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9189