-
Notifications
You must be signed in to change notification settings - Fork 63
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
misc: let's make copr_new_packages a lot faster #3487
Conversation
362dda5
to
e30d437
Compare
I tried to run the original script with a profiler
You are right that the Instead of doing the proposed async thing and bombarding Koji with thousands of requests in parallel, I'd rather use something like this
to get the list of all Fedora Rawhide packages at once (it takes 5-10s) and update |
TIL there's fedora-repoquery, nice. |
Asking koji for each package was slow, also we were spamming koji API. This gets every package just once.
e30d437
to
4987a0b
Compare
not if you stick with getting 1000 packages but that gets you max 10 days old packages at best, so the pool to choose from is really thin. If you want to cover everything from the latest fedora magazine to today, you need to go with more packages than 1000 (e.g. 10k), which takes ages.
really nice, I didn't know about this feature! This is even better and simpler 1000 before:
1000 after:
10k before (hours -> i don't want to do that) 10k after:
pls try 🙏 |
misc/copr_new_packages.py
Outdated
@@ -33,36 +34,44 @@ def pick_project_candidates(client, projects, since): | |||
Magazine article). By such projects we consider those with at least one | |||
succeeded build and at least some project information filled. | |||
""" | |||
rawhide_pks_resp = subprocess.run( | |||
["dnf", "repoquery", "rawhide", "--queryformat", "%{name}", "*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with
dnf repoquery rawhide --queryformat "%{name}" "*"
in comparison to
fedora-repoquery rawhide "*"
is that dnf repoquery
doesn't only look into Fedora repositories but to all enabled repositories on the system (e.g. all my enabled Copr projects)
$ dnf repoquery rawhide --queryformat "%{name}" "*" |grep nix-singleuser
nix-singleuser
$ fedora-repoquery rawhide "*" |grep nix-singleuser
$ dnf info nix-singleuser
Available Packages
Name : nix-singleuser
...
Repository : copr:copr.fedorainfracloud.org:petersen:nix
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, ptal
4987a0b
to
c207835
Compare
let's discuss this on planning first