Project

General

Profile

Actions

action #154735

closed

[error in gru journal] DBIx::Class::Storage::DBI::select_single(): Query returned more than one row size:S

Added by tinita 11 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-02-01
Due date:
% Done:

0%

Estimated time:

Description

Observation

In osd gru journal I can find several of those messages:

Jan 31 14:47:54 openqa openqa-gru[20400]: DBIx::Class::Storage::DBI::select_single(): Query returned more than one row.  SQL that returns multiple rows is DEPRECATED for ->find and ->single at /usr/share/openqa/script/../lib/OpenQA/Schema/Result/ScheduledProducts.pm line 707

The code is getting one row of the WORKER_CLASS settings from a job and its parent and then compares them:
https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/Result/ScheduledProducts.pm#L707-L711

                $worker_class = $job->settings->find({key => 'WORKER_CLASS'});
                $worker_class = $worker_class ? $worker_class->value : '';
            }
            my $parent_worker_class
              = $schema->resultset('JobSettings')->find({job_id => $parent, key => 'WORKER_CLASS'});

Not sure how that's supposed to work as the WORKER_CLASSes are in multiple rows. I assume it "works" because the first row is usually consistent because postgres orders by id by default?

Suggestions

Actions

Also available in: Atom PDF