-
Notifications
You must be signed in to change notification settings - Fork 21
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
CSAF upload: duplicate key value violates unique constraint "package_type_namespace_name_key" #1036
Comments
does this cause any errors of the upload process? |
yes And that is random influenced by concurrency (still don't know what part of the code is causing it). |
Ah I see. Ok, then I'd suggest to check if we can turn this into an "upsert". "insert … on conflict … do nothing". |
yeah thanks but I already tried this with no success as the table contains 2 constraints, and currently using the rsql> .describe base_purl
Column | Type | Not null | Default
-----------+-------------+----------+---------
id | uuid | No |
timestamp | timestamptz | Yes | now()
type | varchar | No |
namespace | varchar | Yes |
name | varchar | No |
Indexes
Index | Columns | Unique
---------------------------------+-----------------------+--------
base_purl_id_idx | id | No
basepurlnameginidx | name | No
basepurlnamespaceginidx | namespace | No
basepurltypeginidx | type | No
package_pkey | id | Yes
package_type_namespace_name_key | namespace, name, type | Yes Unless I'm doing something wrong with sea-orm, when I change something related with on_conflict it fails with the other constraint |
I think that makes sense to close and keep the focus on #999 |
This is happening on current main branch
Steps:
rm -Rf .trustify
cargo run --bin trustd
trustify/etc/test-data/csaf/
foo.zip( I got those files via an old version before this with the command
cargo run --bin xtask generate-dump -w ....
)The text was updated successfully, but these errors were encountered: