-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Missing Reviewers group on PR breakes SQL Database #23738
Comments
Feels like deleting old Teams and creating new teams breaks the PR structure. Even if new team has all necessery access the PR is somehow asociates with old teams. Seems like a bug |
I have the same issue too |
Agree! It's a real problem! |
I think the real problem is that PSs (Reviewers for PR) are mapped by TeamID in SQL database, so when you delete group "Team1" and add users with same privileges to another team, the PRs are still looking for previous TeamID in SQL.
|
… team (#24127) Close: #23738 The actual cause of `500 Internal Server Error` in the issue is not what is descirbed in the issue. The actual cause is that after deleting team, if there is a PR which has requested reivew from the deleted team, the comment could not match with the deleted team by `assgin_team_id`. So the value of `.AssigneeTeam` (see below code block) is `nil` which cause `500 error`. https://github.com/go-gitea/gitea/blob/1c8bc4081a4f4d0d921ac218cb724ce97924d410/templates/repo/issue/view_content/comments.tmpl#L691-L695 To fix this bug, there are the following problems to be resolved: - [x] 1. ~~Stroe the name of the team in `content` column when inserting `comment` into DB in case that we cannot get the name of team after it is deleted. But for comments that already exist, just display "Unknown Team"~~ Just display "Ghost Team" in the comment if the assgined team is deleted. - [x] 2. Delete the PR&team binding (the row of which `review_team_id = ${team_id} ` in table `review`) when deleting team. - [x] 3.For already exist and undeleted binding rows in in table `review`, ~~we can delete these rows when executing migrations.~~ they do not affect the function, so won't delete them.
Description
We have 2 instances of gitea server, where we testing enabling LDAP Grout sync with organizations and teams. After we have enabled this config, when we open a PR we got 500 Error. On the SQL Database side logs show this error. DB restarts in cycle all the time on both instances.
How To reproduce this issue:
The config of LDAP mapping
Gitea Version
1.19.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Docker
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: