Closed r-c-n closed 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
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?
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.
Is it tested? Can we merge it?
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.
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