Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

glehmann
Copy link
Contributor

No description provided.

and ease the debugging

Signed-off-by: Gaëtan Lehmann <[email protected]>
@glehmann glehmann requested review from stormi and ydirson May 22, 2025 14:00
@@ -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']
Copy link
Member

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.

Copy link
Contributor Author

@glehmann glehmann May 22, 2025

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 👍

Copy link
Member

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.

@glehmann glehmann force-pushed the gln/sort-build-tag-timestamp-onvy branch from 1d63f25 to 26e7ff4 Compare May 22, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants