Debian Package Registry: duplicate key value violates unique constraint "UQE_package_version_s" #12993

Open
opened 2025-11-02 10:27:07 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mattepica on GitHub (May 14, 2024).

Description

When uploading multiple deb for different architectures at the same time (E.G. using GoReleaser HTTP Upload) we get this HTTP error:
http 500 pq: duplicate key value violates unique constraint "UQE_package_version_s

Docker log:

"...packages/packages.go:170:createPackageAndVersion() [E] Error inserting package: pq: duplicate key value violates unique constraint \"UQE_package_version_s\"\n"
"...ges/debian/debian.go:27:apiError() [E] pq: duplicate key value violates unique constraint \"UQE_package_version_s\"\n"
"...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/packages/user/debian/pool/jammy/main/upload for IP, 500 Internal Server Error in 44.7ms @ debian/debian.go:122(debian.UploadPackageFile)\n"
"...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/packages/user/debian/pool/jammy/main/upload for IP, 201 Created in 120.4ms @ debian/debian.go:122(debian.UploadPackageFile)\n"

Gitea Version

1.21.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Multi-container Docker

Database

PostgreSQL

Originally created by @mattepica on GitHub (May 14, 2024). ### Description When uploading multiple deb for different architectures at the same time (E.G. using GoReleaser HTTP Upload) we get this HTTP error: ```http 500 pq: duplicate key value violates unique constraint "UQE_package_version_s``` Docker log: ``` "...packages/packages.go:170:createPackageAndVersion() [E] Error inserting package: pq: duplicate key value violates unique constraint \"UQE_package_version_s\"\n" "...ges/debian/debian.go:27:apiError() [E] pq: duplicate key value violates unique constraint \"UQE_package_version_s\"\n" "...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/packages/user/debian/pool/jammy/main/upload for IP, 500 Internal Server Error in 44.7ms @ debian/debian.go:122(debian.UploadPackageFile)\n" "...eb/routing/logger.go:102:func1() [I] router: completed PUT /api/packages/user/debian/pool/jammy/main/upload for IP, 201 Created in 120.4ms @ debian/debian.go:122(debian.UploadPackageFile)\n" ``` ### Gitea Version 1.21.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Multi-container Docker ### Database PostgreSQL
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 10:27:07 -06:00
Author
Owner

@KN4CK3R commented on GitHub (May 14, 2024):

Related #30171, #29563, #27640

@KN4CK3R commented on GitHub (May 14, 2024): Related #30171, #29563, #27640
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12993