chaoss / chaoss/CollectOSS

Collect_pull_requests : IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"

Open
#93 22 comments 0 reactions 1 assignee Claimed by @cdolfi View on GitHub
database deployed version server workers
Dominant language
Python
Stars
13
Forks
17
Avg merge
6h 59m
Merged PRs (30d)
1

Description

> [!NOTE]
> Migrated from [augurlabs/augur#3192](https://github.com/augurlabs/augur/issues/3192)
> Originally opened by `@cdolfi` on 2025-06-16

---

We are seeing about 50 of these post duplicate script. I will provide examples but if it is not already, pull_request natural key to be based off of pr_src_id might solve this problem, similar to augurlabs/augur#3046

Errors:

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/quarkusio/quarkus-release/pulls/4) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/apache/incubator-kie-drools/pulls/1789) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/apache/incubator-kie-kogito-runtimes/pulls/2787) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/sigstore/sigstore-go/pulls/76) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/osbuild/osbuild.github.io/pulls/23) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/sigstore/ruby-sigstore/pulls/34) already exists.\n')

IntegrityError('(psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "pull-request-insert-unique"\nDETAIL: Key (pr_url)=(https://api.github.com/repos/huggingface/lm-evaluation-harness/pulls/11) already exists.\n')
--

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.