Codeberg-CI/feedback
488
71

"Error 1062 (23000): Duplicate entry" after removing and re-adding a repository #120

Closed
opened 2023年06月15日 12:52:19 +02:00 by heiko · 15 comments
Member
Copy link

After removing and re-adding a repository (which I had previously enabled CI for), I'm getting a database error when trying to re-"enable" that repository for CI:

Error 1062 (23000): Duplicate entry 'heiko-openpgp-x509-sequoia' for key 'UQE_repos_name'

At first glance, I couldn't find any way to fix this unfortunate state in the web interface.

After removing and re-adding a repository (which I had previously enabled CI for), I'm getting a database error when trying to re-"enable" that repository for CI: `Error 1062 (23000): Duplicate entry 'heiko-openpgp-x509-sequoia' for key 'UQE_repos_name'` At first glance, I couldn't find any way to fix this unfortunate state in the web interface.

I'm getting the same error on a repository I've never made before:

Error 1062 (23000): Duplicate entry 'hanna-hyper' for key 'UQE_repos_name'

Update: after resetting my token I am now getting the following:

Repository is already active.

However no matter how many times i refresh or clear cache, it doesn't show the repository.

I'm getting the same error on a repository I've never made before: ``` Error 1062 (23000): Duplicate entry 'hanna-hyper' for key 'UQE_repos_name' ``` **Update:** after resetting my token I am now getting the following: ``` Repository is already active. ``` However no matter how many times i refresh or clear cache, it doesn't show the repository.

@6543 this is your area I think from the bit I've talked to you.

@6543 this is your area I think from the bit I've talked to you.

Removing @hanna from the team and re-adding it did not work. (That's all I could try from my end.)

Removing @hanna from the team and re-adding it did not work. (That's all I could try from my end.)
Owner
Copy link

well I exactly know the reason: if you delete a old repo on the gitea side, woodpecker has no chance to get a note of that. so on aktivation we need to clean old repos if still in existance

well I exactly know the reason: if you delete a old repo on the gitea side, woodpecker has no chance to get a note of that. so on aktivation we need to clean old repos if still in existance
Owner
Copy link

and there could also be al collition as of case sensitive vs case insensitive name handeling - witch we should improve

and there could also be al collition as of case sensitive vs case insensitive name handeling - witch we should improve

well I exactly know the reason: if you delete a old repo on the gitea side, woodpecker has no chance to get a note of that. so on aktivation we need to clean old repos if still in existance

any idea when this will be able to be fixed, as it was preventing me from using it.

> well I exactly know the reason: if you delete a old repo on the gitea side, woodpecker has no chance to get a note of that. so on aktivation we need to clean old repos if still in existance any idea when this will be able to be fixed, as it was preventing me from using it.

I did some experiments with importing a repo vs pushing it from scratch which led me to delete it and add it again, and I am now hitting the same issue:

Error 1062 (23000): Duplicate entry 'poezio-poezio' for key 'UQE_repos_name'
I did some experiments with importing a repo vs pushing it from scratch which led me to delete it and add it again, and I am now hitting the same issue: ``` Error 1062 (23000): Duplicate entry 'poezio-poezio' for key 'UQE_repos_name' ```
Author
Member
Copy link

I wonder if it would be feasible/reasonable to give users a "drop all CI-related SQL state" button, for hard-resetting such inconsistent states?

I wonder if it would be feasible/reasonable to give users a "drop all CI-related SQL state" button, for hard-resetting such inconsistent states?
Owner
Copy link

this repo was als hit, and did cointain a lot of webhooks:

image

this repo was als hit, and did cointain a lot of webhooks: ![image](/attachments/45b00cc6-01de-433c-ab13-82d4cd1bd9e2)
141 KiB
Owner
Copy link

Still present. Reprex:

  1. Create repo in Gitea
  2. Enable it in WP
  3. Delete repo in Gitea
  4. Create repo with the same name in Gitea
  5. Try to enable it again

-> error

Still present. Reprex: 1. Create repo in Gitea 2. Enable it in WP 3. Delete repo in Gitea 4. Create repo with the same name in Gitea 5. Try to enable it again -> error
Owner
Copy link
Upstream issue: https://github.com/woodpecker-ci/woodpecker/issues/3020

Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index'

I'd love to migrate my open source project from GH to here but it feels like Codeberg is fighting tooth and nail every step of the way to prevent that from happening. I'm sorry to say but the migrate repository feature is a terrible user experience, if not outright busted. The fact that this issue was opened 2 years ago...wow.

Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index' I'd love to migrate my open source project from GH to here but it feels like Codeberg is fighting tooth and nail every step of the way to prevent that from happening. I'm sorry to say but the migrate repository feature is a terrible user experience, if not outright busted. The fact that this issue was opened 2 years ago...wow.

It's really surprising it stayed out of sight for 2 years tho . Really weird

Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index'

I'd love to migrate my open source project from GH to here but it feels like Codeberg is fighting tooth and nail every step of the way to prevent that from happening. I'm sorry to say but the migrate repository feature is a terrible user experience, if not outright busted. The fact that this issue was opened 2 years ago...wow.

It's really surprising it stayed out of sight for 2 years tho . Really weird > Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index' > > I'd love to migrate my open source project from GH to here but it feels like Codeberg is fighting tooth and nail every step of the way to prevent that from happening. I'm sorry to say but the migrate repository feature is a terrible user experience, if not outright busted. The fact that this issue was opened 2 years ago...wow.

@cookiefactory wrote in #120 (comment):

Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index'

This is not the same error or even related. This is the feedback repository about CI. You likely want to file a iasue in https://codeberg.org/codeberg/community.

@cookiefactory wrote in https://codeberg.org/Codeberg-CI/feedback/issues/120#issuecomment-9694619: > Similar: Error 1062 (23000): Duplicate entry '1130054-1' for key 'UQE_issue_repo_index' This is not the same error or even related. This is the feedback repository about CI. You likely want to file a iasue in https://codeberg.org/codeberg/community.
Owner
Copy link

a lot of code changed in regards to repo unique contrains ... if it still exist we should reopen a new issue

a lot of code changed in regards to repo unique contrains ... if it still exist we should reopen a new issue
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
9 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg-CI/feedback#120
Reference in a new issue
Codeberg-CI/feedback
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?