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

Negative open Pull request count persists #19505

Closed
kricka91 opened this issue Apr 26, 2022 · 8 comments
Closed

Negative open Pull request count persists #19505

kricka91 opened this issue Apr 26, 2022 · 8 comments
Labels
issue/duplicate The issue has already been reported. type/bug

Comments

@kricka91
Copy link

Description

I have somehow been able to close a pull request twice, which results in an incorrect (negative) count of open pull request. This issue has supposedly been fixed in the code (#7518), but after I upgraded to Gitea 1.16.5 and migrated the data, the incorrect negative count still shows. The duplicate PR close probably happened a while ago using Gitea v1.10.1.

Will this be automatically corrected after opening or closing a new pull request, or should it have been corrected when migrating the database data? Or what do I need to do in order to correct this? I guess I could try something, but it would be good to get confirmation from someone who knows so that others with the same problem can see.

Gitea Version

1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

In Kubernetes with existing helm charts.

Database

PostgreSQL

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 26, 2022

Possible the longstanding problem related to

And maybe some database transaction should be used to avoid double-closing

@kricka91
Copy link
Author

Well, I guess one problem is the duplicate comments/closes, and another problem is the negative pull request count, which is caused by the former. I could live with the duplicate closes still being shown in the UI, but I would really like the pull request count to be accurate. Is it correct that the fix I linked to (#7518) is supposed to address this? And if so, when is the code in the fix executed?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 26, 2022

There could be some different causes. For example, the #18330 said another possibility about wrong counting number.

The #7518 did do some fixes, indeed it's an old fix and may not be related directly to the new issue. (of course, the fix code in it should always works, the feature is on admin -> monitoring -> Check all repository statistics, it will do the fix everyday midnight, and you can run it manually)

So your new issue need more clues, how it occurs and maybe needs some new fixes. I highly suspect it's related to #17111 or #18330 . Or you could help the maintainers to know how to trigger the bug. Otherwise I have no idea at the moment, we could just wait for someone knows how the bug occurs to help.

@kricka91
Copy link
Author

Nothing is updated automatically at midnight, unless of course it continues to compute it incorrectly.

I cannot find any feature like this in the Gitea GUI. Is it a setting on an organization level? Repo level? Global level?

@wxiaoguang
Copy link
Contributor

Nothing is updated automatically at midnight, unless of course it continues to compute it incorrectly.

I cannot find any feature like this in the Gitea GUI. Is it a setting on an organization level? Repo level? Global level?

the feature is on admin -> monitoring -> Check all repository statistics, if it doesn't help, then they are not related either.

@kricka91
Copy link
Author

Ok, I found it. I had to be logged in as gitea_admin and go to Site Administration to find it. However, running it didn't help, and it also shows that the task has been executed last midnight, even though I didn't see any results of that. Probably something else, then.

@PotatoesFall
Copy link
Contributor

PotatoesFall commented May 16, 2022

I reported this same issue a while ago in #19349, good to see it is now being addressed 👍

@lunny lunny added the issue/duplicate The issue has already been reported. label Oct 21, 2022
@lunny
Copy link
Member

lunny commented Oct 21, 2022

duplicated with #19349

@lunny lunny closed this as completed Oct 21, 2022
6543 pushed a commit that referenced this issue Oct 25, 2022
fix #19349 , #19505

Co-authored-by: delvh <dev.lh@web.de>
@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

4 participants