canonical / certification.ubuntu.com

1 stars 14 forks source link

Ability to search/fitler by architecture #117

Closed bladernr closed 2 years ago

bladernr commented 3 years ago

We periodically get questions like:

"How can I see what ARM/Power/etc servers have been certified?"

Currently, there is no way to filter based on architecture, and I don't think that was considered as a filter option as part of the rewrite. So could we add a way to filter/search based on architecture? For example:

As a server buyer, I want to see all certified ARM/Power/s390x servers. As an IoT shopper, I want to see all certified x86 based IoT devices.

I'm trying to imagine the best way to see this, and the best I have is a "View all certified Servers" view, that then can be filtered by selecting one or more of "All known architectures" from the list of architectures that C3 returns via API (if it does so).

codersquid commented 3 years ago

There are two API endpoints that return information about certified models, certifiedmodels and certifiedmodeldetails.

The certifiedmodels endpoint is used for the search results landing pages and it isn't based on a query that includes any architecture information. It can't support any filter for architecture information.

The certifiedmodeldetails endpoint is what is used when a user clicks through to see details about a system. It's not used for the search results landing pages because it's more expensive. It should not be used for searches, only for getting details about one system.

But technically, that endpoint is based off of a table that has a FK to a table with a FK to another table (cringe) with architecture information. There's no search filter for it right now. Off the top of my head, it should be possible to add a filter for it. But, it would be expensive. I don't think the search landing pages should use this endpoint. The performance would be worse.