-
Notifications
You must be signed in to change notification settings - Fork 4.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
Duplicate repository #19925
Comments
Hello, In Postgresql query we could see it is listing both "go_user_task" and "go-user-task" May be postgresql is failed differentiate between "_" and "-"
|
Hello, harbor_db=> \d repository Table "public.repository" It is same. The issue arises when we have a repo name "go_user_task" and rename to "go-user-task". Also i saw a similar post #19468. Thank You, |
Could you describe how do you exactly rename |
Hello, We accidently use the repo name "go-user-task" instead of "go_user_task", then tag and push the image. Thanks, |
@AyushCloud could you please provide us with steps how you end up with two I tried the following steps intending to reproduce this scenario:
but there are two repositories with different name, such as |
Hello, Even i tried to reproduce, but it is now showing any duplicate repo. select * from repository where name LIKE 'components/go_admin%'; Based on the time stamp, i could say that, on 25th January we did an upgrade to v2.8.4. Thanks, |
please follow this workaround: closing it now. |
Regarding: Duplicate Repository I encountered the same issue after upgrading from Harbor version v2.8.2-d4c34dcc to v2.8.4-ad3e767d regarding image repository management. Before the upgrade, I had several images pushed with different repository names, some containing underscores ('_') and hyphens ('-'). For instance, repositories like go_admin_task/image:1.0, go-admin-task/image:1.0, before-upgrade:1.0, and before_upgrade:2.0 were present. After the upgrade, I noticed that images from repositories with names differing only in the use of underscores or hyphens were unexpectedly deleted. Specifically, repositories with names like go_admin_task/image:1.0 and go-admin-task/image:1.0, as well as before-upgrade:1.0 and before_upgrade:2.0, were affected. Interestingly, repositories without such naming discrepancies, like temp_admin/image:1.0 and temp_admin/image:2.0, remained intact. Furthermore, attempts to push images to repositories containing underscores or hyphens post-upgrade resulted in the creation of duplicate repositories. This behavior was not observed prior to the upgrade. I believe this issue warrants attention from the Harbor community as it impacts repository management consistency and may lead to unintended data loss or duplication. Any assistance or insights into resolving this matter would be greatly appreciated. Thank you |
Can you please create an issue in PostgreSQL project asking why it lists both |
Another question: Has ever this Harbor instance been upgraded from a version older than v2.3.0? see the faq: https://github.com/goharbor/harbor/wiki/Harbor-FAQs#duplicate-repository-name-in-the-same-project |
Hello, We found this issue in our production environment which is upgraded from time to time. The main issue is that when two repo exist with same name and only difference is "_" "-", then post upgrade the images are deletes and when we try to push any image to those repos then they are duplicated which is visible in database queries So it seems the main issue is that post upgrade the repos should not be empty. Thank You, Thank You, |
Steps to Reproduce the issue: Before Upgrade: Version -> v2.8.2
After Upgrade: Version -> v2.8.4
These observations suggest a discrepancy in repository management post-upgrade, specifically regarding repositories with similar names distinguished only by the use of '-' and '_'. Thank you, |
@zyyw Any update on above issue (Repository duplication) ? |
Please refer to this FAQ |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue. |
Hello,
In Harbor 2.8.4 we could see the duplicate repository.
Is this a known issue ?
PFA the screenshot.
Thank You,
![dup-repe](https://private-user-images.githubusercontent.com/53472266/300775751-1a7152c3-4dfe-4795-bf0c-a2b02ee86182.PNG?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0MzczODUsIm5iZiI6MTcyMTQzNzA4NSwicGF0aCI6Ii81MzQ3MjI2Ni8zMDA3NzU3NTEtMWE3MTUyYzMtNGRmZS00Nzk1LWJmMGMtYTJiMDJlZTg2MTgyLlBORz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDAwNTgwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlOGZkMWQ3YTA5OGQyM2M5NmZhYmZhNzY4MDgyODFjOTA3ZWUyZDZlYTkzMmU4YWJjNTNiODIzMmQ5NzU3ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BSmY6yy443o1lTmNGb7BecN-K0tM3BM_mQktDmMCRYE)
Ayush
The text was updated successfully, but these errors were encountered: