-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Request to change PR target branch (merge-base) sometimes does not work #13423
Comments
sounds bad, I have the feeling it is because of SQLite ... but without any logs & no way to reproduce it myselve I dont know how to find the issue |
This is one of the few times when It would also be helpful to get some logs just before the POST in case the deadlock occurs just before that. |
Is there a way I can migrate safely to a different database backend? Then I could verify if that's the case.
It looks to me (I've not touched gitea code but written webapps myself) that the query before is to update notifications, and the queries after what I already posted (Session ID + CSRF Token) are for rerendering the page. I do not see any queries to mutate the actual target branch.
While that is certainly possible, I think it is unlikely. The request fails reliably on the same PR every time, regardless of what I do before. For example, I can "copy as curl" the request from chrome/firefox devtools and run it all on its own, without prior requests, and it will still fail. I don't need to load the PR's page itself for it to fail. FYI I have Drone CI installed and checks enabled on the repository. Disabling the webhook does not unbreak the PR, though maybe when I have it disabled when creating the PR, it might never break. Hard to debug since I can't disable that for all the team, all the time, on the repo that can reproduce the issue :/ I noticed something while looking at the code, trying to understand the steps involved in the update of the PR. Here, the function Lines 163 to 166 in dfa7291
That function, Lines 59 to 62 in dfa7291
Well, looking at both parts, and the git blame of those files, I notice that the comment,
Also, while tracing backwards the implementation of Overall, I'm wondering if the copy of the implementation is really necessary or if it should be replaced with a call to the original function and either an additional argument for saving more information ( |
@opatut one thing we could test ... to change base-branch via api ... https://try.gitea.io/api/swagger#/repository/repoEditPullRequest And #13381 start refactoring things ... |
Same problem. Request does not terminate, spinner goes indefinitely. If I use an invalid branch name it exits with an error though (e.g. |
We are seeing the same thing on our Gitea 1.13.2 installation using PostgreSQL. Changing target branches on PRs never works for us. Anything else we can do to help diagnose the issue? |
I suspect that #14598 will fix this too. |
@parnic-sks would you be able to test now that #14598 has been merged? |
@zeripath Confirmed; LGTM, thanks! Now I just want to look into adding a progress indicator of some kind while the XHR happens so the user knows the switch is pending. Hopefully I can get a PR up for that once I learn how to correctly rebuild the frontend/template/i18n files when they've changed. :) |
OK I'll close this and mark it as fixed by #14598 |
[x]
):Description
Changing the base branch of a pull request through the UI sometimes just does nothing. I have no clue what PRs this works on and which not, so I have no reliable way of reproducing this. The POST request to
/<repo>/pull/<num>/target_branch
never produces a response. Verbose logging of everything (according to the guide from the issue template) is only this:No response, no more logging.
Whether or not the request works depends on the PR. It never works for the same PR, but other PRs work.
The text was updated successfully, but these errors were encountered: