Project

General

Profile

Actions

action #35749

closed

Ignore insert errors in limit_assets

Added by coolo about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2018-05-02
Due date:
% Done:

0%

Estimated time:

Description

We have repeatedly limit_asset jobs failing due to:

   "error" => "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint \"assets_type_name\"\nDETAIL:  Key (type, name)=(iso, openSUSE-Leap:15.0-Staging:E-Staging-DVD-x86_64-Build131.1-Media.iso) already exists. [for Statement \"INSERT INTO assets ( name, t_created, t_updated, type) VALUES ( ?, ?, ?, ? ) RETURNING id\" with ParamValues: 1='openSUSE-Leap:15.0-Staging:E-Staging-DVD-x86_64-Build131.1-Media.iso', 2='2018-04-28 10:51:47', 3='2018-04-28 10:51:47', 4='iso'] at /usr/share/openqa/script/../lib/OpenQA/Schema/ResultSet/Assets.pm line 40\n"

This is because limit_assets tries to insert new assets - just as ISOs post does. So the insert is fine to fail - so either catch it or use postgresql ON CONFLICT DO NOTHING


Related issues 1 (0 open1 closed)

Related to openQA Project - action #109292: OSD is missing x86_64 jobs duplicate key value violates unique constraint "assets_type_name" in lib/OpenQA/Schema/ResultSet/Assets.pm line 33 within find_or_createResolvedmkittler2022-03-31

Actions
Actions

Also available in: Atom PDF