Missing mirror URL on project dashboard #12079

Open
opened 2025-11-02 09:57:07 -06:00 by GiteaMirror · 26 comments
Owner

Originally created by @somera on GitHub (Nov 24, 2023).

Description

Since I upgraded to 1.21.0 I see more and more mirrors with no Mirror URL

image

The sync for this mirror is working.

In PostgreSQL I see the URL

image

I checked ~200 projects. In 24 the mirror url is not visible. some days ago I deleted one mirror and added it again and I saw the mirror url. But today I can't see it in project dashboard.

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.43.0

Operating System

Ubuntu 20.04.x

How are you running Gitea?

gitea-1.21.0-linux-amd64

Database

PostgreSQL

Originally created by @somera on GitHub (Nov 24, 2023). ### Description Since I upgraded to 1.21.0 I see more and more mirrors with no **Mirror URL** ![image](https://github.com/go-gitea/gitea/assets/8334250/852c009f-a93d-41cb-9f5e-8179df7c1a23) The sync for this mirror is working. In PostgreSQL I see the URL ![image](https://github.com/go-gitea/gitea/assets/8334250/744996f7-0899-4c9c-b7c8-bed5155269a3) I checked ~200 projects. In 24 the mirror url is not visible. some days ago I deleted one mirror and added it again and I saw the mirror url. But today I can't see it in project dashboard. ### Gitea Version 1.21.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.43.0 ### Operating System Ubuntu 20.04.x ### How are you running Gitea? gitea-1.21.0-linux-amd64 ### Database PostgreSQL
GiteaMirror added the type/bugissue/workaround labels 2025-11-02 09:57:07 -06:00
Author
Owner

@lunny commented on GitHub (Nov 25, 2023):

Could you find any error logs?

@lunny commented on GitHub (Nov 25, 2023): Could you find any error logs?
Author
Owner

@somera commented on GitHub (Nov 25, 2023):

@lunny. No.

In browser I see this

image

@somera commented on GitHub (Nov 25, 2023): @lunny. No. In browser I see this ![image](https://github.com/go-gitea/gitea/assets/8334250/3c56f785-d84c-4ea6-ab35-dbcf4daac2bf)
Author
Owner

@lunny commented on GitHub (Nov 25, 2023):

I think it maybe a translation problem. Could you try English?

@lunny commented on GitHub (Nov 25, 2023): I think it maybe a translation problem. Could you try English?
Author
Owner

@somera commented on GitHub (Nov 25, 2023):

As I wrote. No -> I can't see any errors in the gitea logs.

The screenshot which I posted was just from the browser. This was probably confusing.

@somera commented on GitHub (Nov 25, 2023): As I wrote. No -> I can't see any errors in the gitea logs. The screenshot which I posted was just from the browser. This was probably confusing.
Author
Owner

@lunny commented on GitHub (Nov 25, 2023):

Yes. To confirm my guess. Could you try to switch English from the footer right corner and take a look again?

@lunny commented on GitHub (Nov 25, 2023): Yes. To confirm my guess. Could you try to switch English from the footer right corner and take a look again?
Author
Owner

@somera commented on GitHub (Nov 25, 2023):

I try this later. I'm upgrading now to PostgreSQL 16 and Ubuntu 22.04.

@somera commented on GitHub (Nov 25, 2023): I try this later. I'm upgrading now to PostgreSQL 16 and Ubuntu 22.04.
Author
Owner

@somera commented on GitHub (Nov 25, 2023):

I did it. Same problem
image

@somera commented on GitHub (Nov 25, 2023): I did it. Same problem ![image](https://github.com/go-gitea/gitea/assets/8334250/08dfb461-9e44-4f3b-b313-0c380bcee65e)
Author
Owner

@somera commented on GitHub (Nov 25, 2023):

I found at the moment 44 projects with this issue. But I have no time to check all mirrors.

@somera commented on GitHub (Nov 25, 2023): I found at the moment 44 projects with this issue. But I have no time to check all mirrors.
Author
Owner

@somera commented on GitHub (Nov 26, 2023):

~80 mirrors now affected.

@somera commented on GitHub (Nov 26, 2023): ~80 mirrors now affected.
Author
Owner

@somera commented on GitHub (Nov 27, 2023):

@lunny no changes here with 1.21.1

@somera commented on GitHub (Nov 27, 2023): @lunny no changes here with 1.21.1
Author
Owner

@somera commented on GitHub (Nov 27, 2023):

@lunny when I do this

[Mo Nov 27][19:23:44][xxx]@[xxx]:[~]$ curl http://xxx/git/api/v1/repos/skeeto/Spacefront | jq | grep original
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2111    0  2111    0     0   223k      0 --:--:-- --:--:-- --:--:--  229k
  "original_url": "https://github.com/skeeto/Spacefront.git",

than I see the original_url. Looks good.

I restarted my memcached. But there was no change.

image

@somera commented on GitHub (Nov 27, 2023): @lunny when I do this ``` [Mo Nov 27][19:23:44][xxx]@[xxx]:[~]$ curl http://xxx/git/api/v1/repos/skeeto/Spacefront | jq | grep original % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2111 0 2111 0 0 223k 0 --:--:-- --:--:-- --:--:-- 229k "original_url": "https://github.com/skeeto/Spacefront.git", ``` than I see the original_url. Looks good. I restarted my memcached. But there was no change. ![image](https://github.com/go-gitea/gitea/assets/8334250/da4d86cc-1c5b-47d2-8b55-0e7de8650d53)
Author
Owner

@somera commented on GitHub (Nov 28, 2023):

@lunny any updates here? The problem makes it a little difficult for me to work with Gitea.

@somera commented on GitHub (Nov 28, 2023): @lunny any updates here? The problem makes it a little difficult for me to work with Gitea.
Author
Owner

@somera commented on GitHub (Nov 29, 2023):

@lunny I found the problem. ~17% mirrors are affected on my gitea instance. The problem is, that in the mirrors table the remote_address column is empty. I can fix it by setting the column. But there is an bug, cause I migrated new mirrors and some days later the url was empty.

The question is: why is this empty?

@somera commented on GitHub (Nov 29, 2023): @lunny I found the problem. ~17% mirrors are affected on my gitea instance. The problem is, that in the `mirrors` table the `remote_address` column is empty. I can fix it by setting the column. But there is an bug, cause I migrated new mirrors and some days later the url was empty. The question is: why is this empty?
Author
Owner

@somera commented on GitHub (Dec 2, 2023):

After my fix in the DB three days ago nothing changes. It's looks good.

@lunny if you think there is nothig to fix, than this issue can be closed.

@somera commented on GitHub (Dec 2, 2023): After my fix in the DB three days ago nothing changes. It's looks good. @lunny if you think there is nothig to fix, than this issue can be closed.
Author
Owner

@yp05327 commented on GitHub (Dec 5, 2023):

Maybe related to #26952

@yp05327 commented on GitHub (Dec 5, 2023): Maybe related to #26952
Author
Owner

@lunny commented on GitHub (Dec 5, 2023):

After my fix in the DB three days ago nothing changes. It's looks good.

@lunny if you think there is nothig to fix, than this issue can be closed.

Let's leave the issue open since it's possible a bug. And how did you do the workaround?

@lunny commented on GitHub (Dec 5, 2023): > After my fix in the DB three days ago nothing changes. It's looks good. > > @lunny if you think there is nothig to fix, than this issue can be closed. Let's leave the issue open since it's possible a bug. And how did you do the workaround?
Author
Owner

@yp05327 commented on GitHub (Dec 5, 2023):

It seems that this issue is caused by the migration, as remote_address column is empty but original_url is not.

@yp05327 commented on GitHub (Dec 5, 2023): It seems that this issue is caused by the migration, as `remote_address` column is empty but `original_url` is not.
Author
Owner

@somera commented on GitHub (Dec 5, 2023):

Let's leave the issue open since it's possible a bug. And how did you do the workaround?

I set remote_address to the same value like original_url. Before I did this, I compared all te mirrors where remote_address was set.

@somera commented on GitHub (Dec 5, 2023): > Let's leave the issue open since it's possible a bug. And how did you do the workaround? I set `remote_address` to the same value like `original_url`. Before I did this, I compared all te mirrors where `remote_address` was set.
Author
Owner

@lunny commented on GitHub (Mar 4, 2024):

Let's leave the issue open since it's possible a bug. And how did you do the workaround?

I set remote_address to the same value like original_url. Before I did this, I compared all te mirrors where remote_address was set.

After you fix it manually, does any mirrors remote_address become empty?

@lunny commented on GitHub (Mar 4, 2024): > > Let's leave the issue open since it's possible a bug. And how did you do the workaround? > > I set `remote_address` to the same value like `original_url`. Before I did this, I compared all te mirrors where `remote_address` was set. After you fix it manually, does any mirrors remote_address become empty?
Author
Owner

@wxiaoguang commented on GitHub (Mar 4, 2024):

There are not only one issue report for the RemoteAddress problem (eg: #29132)

I think " Add RemoteAddress to mirrors #26952 " is not robust enough.

@wxiaoguang commented on GitHub (Mar 4, 2024): There are not only one issue report for the RemoteAddress problem (eg: #29132) I think " Add RemoteAddress to mirrors #26952 " is not robust enough.
Author
Owner

@somera commented on GitHub (Mar 4, 2024):

After you fix it manually, does any mirrors remote_address become empty?

No. It works fine.

@somera commented on GitHub (Mar 4, 2024): > After you fix it manually, does any mirrors remote_address become empty? No. It works fine.
Author
Owner

@lunny commented on GitHub (Mar 4, 2024):

There are not only one issue report for the RemoteAddress problem (eg: #29132)

I think " Add RemoteAddress to mirrors #26952 " is not robust enough.

Yes, but maybe we can close this one or keep this open for some future refactor PRs about that?

@lunny commented on GitHub (Mar 4, 2024): > There are not only one issue report for the RemoteAddress problem (eg: #29132) > > I think " Add RemoteAddress to mirrors #26952 " is not robust enough. Yes, but maybe we can close this one or keep this open for some future refactor PRs about that?
Author
Owner

@wxiaoguang commented on GitHub (Mar 4, 2024):

Yes, but maybe we can close this one or keep this open for some future refactor PRs about that?

But I just hope there could be a PR fixing the robust problem. It is critical and stops users from upgrading.

@wxiaoguang commented on GitHub (Mar 4, 2024): > Yes, but maybe we can close this one or keep this open for some future refactor PRs about that? But I just hope there could be a PR fixing the robust problem. It is critical and stops users from upgrading.
Author
Owner

@richex-cn commented on GitHub (Jan 22, 2025):

Same issue when I migrate to new version. I have manually fixed it using the following SQL:

UPDATE mirror m SET remote_address = (SELECT r.original_url FROM repository r WHERE r.id = m.repo_id);
@richex-cn commented on GitHub (Jan 22, 2025): Same issue when I migrate to new version. I have manually fixed it using the following SQL: ```sql UPDATE mirror m SET remote_address = (SELECT r.original_url FROM repository r WHERE r.id = m.repo_id); ```
Author
Owner

@somera commented on GitHub (Jan 22, 2025):

I didn't see this issue again after my manual fix in 2023.

@somera commented on GitHub (Jan 22, 2025): I didn't see this issue again after my manual fix in 2023.
Author
Owner

@wxiaoguang commented on GitHub (Jan 22, 2025):

There are not only one issue report for the RemoteAddress problem (eg: #29132)

I think " Add RemoteAddress to mirrors #26952 " is not robust enough.

Yup, it is a bug of #26952 (the migration), so after the version upgrade, it's unlikely to happen again.

@wxiaoguang commented on GitHub (Jan 22, 2025): > There are not only one issue report for the RemoteAddress problem (eg: [#29132](https://github.com/go-gitea/gitea/issues/29132)) > > I think " Add RemoteAddress to mirrors [#26952](https://github.com/go-gitea/gitea/pull/26952) " is not robust enough. Yup, it is a bug of #26952 (the migration), so after the version upgrade, it's unlikely to happen again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12079