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

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

Closed
penguineer opened this issue Jul 6, 2022 · 3 comments
Closed

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

penguineer opened this issue Jul 6, 2022 · 3 comments
Labels
issue/duplicate The issue has already been reported. type/bug

Comments

@penguineer
Copy link

penguineer commented 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

@penguineer penguineer changed the title Two PRs created when using link from Git CLI Two PRs are created when using link from Git CLI Jul 6, 2022
@jolheiser
Copy link
Member

I suspect this isn't because of the link, but because of #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 jolheiser added the issue/duplicate The issue has already been reported. label Jul 6, 2022
@penguineer
Copy link
Author

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

@penguineer
Copy link
Author

@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)?

@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
issue/duplicate The issue has already been reported. type/bug
Projects
None yet
Development

No branches or pull requests

2 participants