Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package search: Add repository queryparam which invokes dnf-json #263

Open
croissanne opened this issue Sep 28, 2021 · 5 comments
Open

package search: Add repository queryparam which invokes dnf-json #263

croissanne opened this issue Sep 28, 2021 · 5 comments
Labels
enhancement New feature or request fleet-mgmt

Comments

@croissanne
Copy link
Member

Instead of #244:

  • keep the package lists for the predefined repos
  • expand /packages to take ?repo= as well, which would invoke dnf-json and search in that repo

This would give package search for non-predefined repos.

@teg
Copy link
Member

teg commented Sep 28, 2021

We should be careful about how this would perform, but overall: I like!

@croissanne
Copy link
Member Author

Yea the assumption is that this would be slow. There's a few options here though:

Get the entire package list? Currently you need to specify search as well, but we could change it to take * or something and it would give you all packages. Edge/fleet mgmt could grab the list once and store it for x amount of time?

We could generate the json blob and store it for x amount of time as well?

@croissanne croissanne added enhancement New feature or request fleet-mgmt labels Sep 28, 2021
@teg
Copy link
Member

teg commented Sep 28, 2021

If we go down this path, we should make dnf-json into a daemon, and pin the caches, that should at least avoid the 1.5s overhead per request. It might then be that (the correct) search is quick (much quicker than depsolving), so this might not be a big problem. Another option would be to make I package searching API, separate from image builder (this really has nothing to do with the rest of the API).

@croissanne
Copy link
Member Author

croissanne commented Sep 28, 2021

Hm I'm not entirely sure I follow. /packages is something that the frontend needs for sure (not for 3rd party repos but still), so why doesn't it belong here?

@teg
Copy link
Member

teg commented Sep 28, 2021

I mean it could be in a separate API, as it does not speak to composer, it does not use the database and the compose API could be used without it. It could also be used independently of image-builder. dnf-as-a-service, if you wish ;) The benefit would be (albeit minimal), that if this gets overloaded it would not affect regular operations. That might be overkill though, just a thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fleet-mgmt
Projects
None yet
Development

No branches or pull requests

2 participants