Skip to content
Commit 2abc59c0 authored by Ryan Roberts's avatar Ryan Roberts
Browse files

cli: Fix "result merge" when filter ids include table index



The "human readable id" format, used to identify benchmarks, swprofiles
and suts in the command line interface, is usually just the name that
the user provided in the plan (in the case of swprofile and sut) or
"suite/name" in the case of benchmark. But these names are not
guaranteed to be unique. If there are multiple objects of the same type
with the same name in the resultstore, the we suffix ":<id>", where <id>
is the unique integer id in the resultstore. That ensures we always have
a unique and friendly way to refer to these objects.

But it turns out that "result merge" was buggy and did not correctly
filter for the "<name>:<id>" case. This was previously implemented with
extra, pre-calculated columns in the tables, which was intended to
simplify the filtering. But the columns were precalculated prior to
inserting the object so the id was None at that point, meaning the
column ended up with "<suite>/<name>:None" in the case of benchmark. For
sut and swprofile, the problem was even worse as the column was misnamed
due to a copy/paste error causing the column to always be NULL.

So let's get rid of those pre-computed columns and just complicate the
filter so that it can concatenate and compare on the fly.

We deliberately allow <name> to be provided as the filter even when
there are multiple objects with <name>. In this case the filter will
match all of them.

Fixes: a869c532 ("cli: Implement resultstore abstraction around database")
Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 9876c68a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment