Clicking on an organization dashboard during a warehouse migration will report a 500 error #9405

Closed
opened 2025-11-02 08:37:47 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @suiyueou on GitHub (Aug 16, 2022).

Description

When an organization is performing a repository migration task in the background, if you switch to the corresponding organization's dashboard in a new tab at this time, a 500 error is reported

In testing, I found that only the organization's dashboard had this problem, everything was fine for the user

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

2.36.2

Operating System

Ubuntu 22.04 LTS

How are you running Gitea?

Docker Deploy

Database

SQLite

Originally created by @suiyueou on GitHub (Aug 16, 2022). ### Description When an organization is performing a repository migration task in the background, if you switch to the corresponding organization's dashboard in a new tab at this time, a 500 error is reported In testing, I found that only the organization's dashboard had this problem, everything was fine for the user ### Gitea Version 1.17.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://user-images.githubusercontent.com/48700331/184783694-8e7a71dd-6004-44b7-a66f-27a37fde5d84.png) ### Git Version 2.36.2 ### Operating System Ubuntu 22.04 LTS ### How are you running Gitea? Docker Deploy ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:37:47 -06:00
Author
Owner

@lunny commented on GitHub (Aug 16, 2022):

When migrating a mirror, the mirror record hasn't been inserted into database at the beginning.

@lunny commented on GitHub (Aug 16, 2022): When migrating a mirror, the mirror record hasn't been inserted into database at the beginning.
Author
Owner

@suiyueou commented on GitHub (Aug 16, 2022):

When migrating a mirror, the mirror record hasn't been inserted into database at the beginning.

It is when the organization is executing the repository migration task in the background, at this time the user accesses the link /org/orgName/dashboard/ will report 500 error, this error I also tested on the old version (1.16.3), and there is no, should be the new version introduced.

For example, a mirror organization is migrating a gitea repository in the background, and during the migration, when I visit the /org/mirror/dashboard page, I get a 500 error.

This error is only triggered when the organization is performing a migration task, and when the migration task is complete, the error disappears and access returns to normal

@suiyueou commented on GitHub (Aug 16, 2022): > When migrating a mirror, the mirror record hasn't been inserted into database at the beginning. It is when the organization is executing the repository migration task in the background, at this time the user accesses the link `/org/orgName/dashboard/` will report 500 error, this error I also tested on the old version (1.16.3), and there is no, should be the new version introduced. For example, a `mirror` organization is migrating a `gitea` repository in the background, and during the migration, when I visit the `/org/mirror/dashboard` page, I get a 500 error. This error is only triggered when the organization is performing a migration task, and when the migration task is complete, the error disappears and access returns to normal
Author
Owner

@zeripath commented on GitHub (Aug 17, 2022):

I've put up a PR to prevent the panic in this code but I think we need to look again at this code and consider whether it's even necessary to call it as I'm not sure that the value of .Mirrors is ever used...

@zeripath commented on GitHub (Aug 17, 2022): I've put up a PR to prevent the panic in this code but I think we need to look again at this code and consider whether it's even necessary to call it as I'm not sure that the value of .Mirrors is ever used...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9405