-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Update of repository mirror settings cause: "PANIC: runtime error" #18204
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
Comments
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jan 7, 2022
In go-gitea#17933 repoAssignment no longer sets the ctx.Repo.Mirror field meaning that attempting change mirror settings results in an NPE. This PR simply restores this. Either we should remove this field or, we should set it. At present it seems simplest to set it instead of going looking in the Data for the value although converting the context to a bag of things may be the correct approach in the future. Fix go-gitea#18204 Signed-off-by: Andrew Thornton <[email protected]>
It's regression of #17933. Have created zpericic@5418716 which resolve this issue. I will wait with PR as there is another approach by @zeripath... |
lunny
pushed a commit
that referenced
this issue
Jan 8, 2022
In #17933 repoAssignment no longer sets the ctx.Repo.Mirror field meaning that attempting change mirror settings results in an NPE. This PR simply restores this. Either we should remove this field or, we should set it. At present it seems simplest to set it instead of going looking in the Data for the value although converting the context to a bag of things may be the correct approach in the future. Fix #18204 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
Chianina
pushed a commit
to Chianina/gitea
that referenced
this issue
Mar 28, 2022
In go-gitea#17933 repoAssignment no longer sets the ctx.Repo.Mirror field meaning that attempting change mirror settings results in an NPE. This PR simply restores this. Either we should remove this field or, we should set it. At present it seems simplest to set it instead of going looking in the Data for the value although converting the context to a bag of things may be the correct approach in the future. Fix go-gitea#18204 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Gitea Version
0acc6a4 - main branch
Git Version
2.33.1
Operating System
No response
How are you running Gitea?
Running using systemd
Database
No response
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
Update of repository mirror settings cause:
It seams that "ctx.Repo.Mirror" is nil.
Tried to trace it to "modules/context/repo.go" and code under repo.IsMirror in repoAssignment() function is evaluated. But no luck.
If someone could at least give a pointer...
Screenshots
No response
The text was updated successfully, but these errors were encountered: