Project

General

Profile

Actions

action #154735

open

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

Added by tinita 2 months ago. Updated about 1 month ago.

Status:
New
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?

Actions #1

Updated by okurz 2 months ago

  • Tags set to reactive work
  • Category set to Feature requests
  • Target version set to Tools - Next
Actions #2

Updated by okurz about 1 month ago

  • Target version changed from Tools - Next to Ready
Actions #3

Updated by okurz about 1 month ago

  • Priority changed from Normal to Low
Actions #4

Updated by okurz about 1 month ago

  • Target version changed from Ready to Tools - Next
Actions

Also available in: Atom PDF