-
Notifications
You must be signed in to change notification settings - Fork 84
Sort the builds based on the tagging timestamp #719
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
base: master
Are you sure you want to change the base?
Conversation
scripts/pkg_in_pipe/pkg_in_pipe.py
Outdated
@@ -315,9 +315,13 @@ def find_pull_requests(gh, repo, start_sha, end_sha): | |||
session = koji.ClientSession('https://kojihub.xcp-ng.org', config) | |||
session.ssl_login(config['cert'], None, config['serverca']) | |||
for tag in tags: | |||
tag_history = dict( | |||
(tl['build_id'], tl['create_ts']) for tl in session.queryHistory(tag=tag)['tag_listing'] |
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.
This can be a slow request, if I trust the delays on CLI when I query the history. Isn't there any filtering option that can speed things up? We don't need the full history, we only need the history relative to the builds that are currently in the tag. So I believe, if the API allows it, that we could filter either on the list of builds in the tag, or, if the API allows it and if it makes sense, an equivalent of --active
on the CLI. I'm not 100% sure what it means, but it seems that it limited the history to pertinent events, including events that concern builds currently in the tag, and it was faster.
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 query is already filtering on the tag.
I tried to add active=True
in the parameters and it's significantly faster (~5s), without causing any problem 👍
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.
Yes, when I meant slow request, that was even when filtering on a given tag. Good for active=True
.
1d63f25
to
26e7ff4
Compare
and ease the debugging Signed-off-by: Gaëtan Lehmann <[email protected]>
Signed-off-by: Gaëtan Lehmann <[email protected]>
26e7ff4
to
c250e45
Compare
No description provided.