-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Enabling repository results in: pq: duplicate key value violates unique constraint "UQE_orgs_name" #2922
Comments
Can you check the content of your DB? What's the data in the |
It's |
That sounds link an issue with sub-groups. I will try to give it a look |
I don't if another commit fix this error but after upgrading to the latest version, It seems to work now. |
I'm currently having this issue (I'm on the latest in the nixpkgs, v2.5.0). I also noticed that:
|
Update: It appears that manually changing the database row does solve the issue. After modifying the row and adding the second repo, it appears the new repo is using the correct org as well |
likely fixed by #4255 |
Can someone verify this so we can close it? |
We moved to forgejo so I can't check it via a gitlab instance. |
Haven't encountered it in my instance since the fix -> closing. |
I just encountered this again adding repos on a new GL instance on most recent WP next :/
What is strange as the Even when assuming that the owner parsing would result in a hickup WRT to subgroups, there would not be a match with an existing entry. The only possibility is WP thinks the owner is my personal user (for which an org already exists) and not the GL organization which is the actual owner. It would be good if WP could actually output the conflicting org for better debugging. |
Meantime you can try to log queries. |
Ah nice, that helped indeed. In the E.g. I am trying to add repo Maybe it is querying the wrong repo ID and hence is trying to do a wrong insert. |
In the above, the first query tries to look for a match with |
Component
server
Describe the bug
Hello,
Encountered an issue when attempting to add a new repository from a GitLab instance hosted on-premise. The error message received is as follows:
pq: duplicate key value violates unique constraint "UQE_orgs_name"
. It works once time but I was the only one developer linked to this organization. Now we are more.Context: The GitLab setup involves multiple organizations, and the bug manifests when trying to add a repository of the second organization.
Should be linked to #2092
We are owners of the organization.
System Info
Additional context
Server log:
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: