kernelci / kernelci-pipeline

Modular pipeline based on the KernelCI API
GNU Lesser General Public License v2.1
6 stars 19 forks source link

regression_tracker: workaround: match node paths programmatically #641

Closed r-c-n closed 3 months ago

r-c-n commented 3 months ago

Don't use 'path' as an api search parameter. The use of lists as query parameters (path is a list) is undefined. Instead, do the filtering in code.

NOT TESTED YET, waiting to see it running on staging

JenySadadia commented 3 months ago

As discussed on Slack, for the time being, we can enable support for querying nodes with array elements https://www.mongodb.com/docs/manual/tutorial/query-arrays/#match-an-array

r-c-n commented 3 months ago

As discussed on Slack, for the time being, we can enable support for querying nodes with array elements https://www.mongodb.com/docs/manual/tutorial/query-arrays/#match-an-array

But that isn't as simple as flicking a switch, isn't it? That'd need changes in https://github.com/kernelci/kernelci-api/blob/16e81dccea653599f6b6c821f75d4b2b972675e2/api/db.py#L98 and other related functions, right?

JenySadadia commented 3 months ago

As discussed on Slack, for the time being, we can enable support for querying nodes with array elements https://www.mongodb.com/docs/manual/tutorial/query-arrays/#match-an-array

But that isn't as simple as flicking a switch, isn't it? That'd need changes in https://github.com/kernelci/kernelci-api/blob/16e81dccea653599f6b6c821f75d4b2b972675e2/api/db.py#L98 and other related functions, right?

That's true. I won't be straight-forward. We can consider this option or node path schema change as you had proposed earlier with '/' as a long-term solution. We don't need to implement any of this atm if the workaround you proposed is enough for now.

nuclearcat commented 3 months ago

Is it tested? Can we merge it?

r-c-n commented 3 months ago

Tested OK, example: https://staging.kernelci.org:9000/viewer?node_id=6673058504520996bd9d592d, which points to a failed node with the same path, including duplicated path parts. Fine by me to merge it.