-
-
Notifications
You must be signed in to change notification settings - Fork 385
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 second repository results in: pq: duplicate key value violates unique constraint "UQE_orgs_name"
#2092
Closed
5 tasks done
Comments
Introduced by #1873 |
This happens because the
Outputs
So
|
We can solve it in |
runephilosof-karnovgroup
added a commit
to runephilosof-karnovgroup/woodpecker
that referenced
this issue
Aug 3, 2023
For "woodpecker-ci" the `name` is "Woodpecker CI" and the `login` is "woodpecker-ci" Fixes woodpecker-ci#2092 This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ```
runephilosof-karnovgroup
added a commit
to runephilosof-karnovgroup/woodpecker
that referenced
this issue
Aug 3, 2023
`Name` is the human readable name, which could be "Woodpecker CI" for the `Path` "woodpecker-ci". Gitlab supports subgroups, so we need to use the FullPath, otherwise we would only get `sub-group` when owner is `parent-group/sub-group`. Fixes woodpecker-ci#2092 when using Gitlab. This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ```
6543
pushed a commit
that referenced
this issue
Aug 3, 2023
For "woodpecker-ci" the `name` is "Woodpecker CI" and the `login` is "woodpecker-ci" Fixes #2092 This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in: ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ```
6543
pushed a commit
to 6543-forks/woodpecker
that referenced
this issue
Aug 3, 2023
For "woodpecker-ci" the `name` is "Woodpecker CI" and the `login` is "woodpecker-ci" Fixes woodpecker-ci#2092 This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in: ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ```
6543
added a commit
that referenced
this issue
Aug 3, 2023
Backport #2104 For "woodpecker-ci" the `name` is "Woodpecker CI" and the `login` is "woodpecker-ci" Fixes #2092 This was causing the organization lookup to fail, because it looks up using the `login`, when it did not find the organization, it would try to create it. The creation would fail, because it uses the `name`, and an organization with that `name` already exists. Resulting in: ``` pq: duplicate key value violates unique constraint "UQE_orgs_name" ``` Co-authored-by: runephilosof-karnovgroup <[email protected]>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component
server
Describe the bug
Enabling my first repository worked fine, however the second does not.
When the UI sends a POST request to https://woodpecker-host/api/repos?forge_remote_id=526933511 it returns this error
The debug log of the server does not give any more insights:
System Info
Additional context
No response
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: