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

correctly obtain failed koji build logs #92

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

TomasTomecek
Copy link
Collaborator

if a koji build fails, sadly this doesn't do anything:

koji_logs = self.client.getBuildLogs(self.build_or_task_id)

koji api docs:

This method will only return logs for builds that are complete.
If a build is in progress, failed, or canceled, you must look at the
build's task logs instead (see listTaskOutput).

Instead, we need to manually traverse the task hierarchy and select the
right buildArch task, which this commit implements.

@nikromen nikromen self-assigned this Jan 22, 2024
@jpodivin jpodivin self-requested a review January 23, 2024 14:07
backend/fetcher.py Outdated Show resolved Hide resolved
weird indentation to please pep8

Signed-off-by: Tomas Tomecek <[email protected]>
if a koji build fails, sadly this doesn't do anything:

    koji_logs = self.client.getBuildLogs(self.build_or_task_id)

koji api docs:

> This method will only return logs for builds that are complete.
> If a build is in progress, failed, or canceled, you must look at the
> build's task logs instead (see listTaskOutput).

Instead, we need to manually traverse the task hierarchy and select the
right buildArch task, which this commit implements.

Signed-off-by: Tomas Tomecek <[email protected]>
@TomasTomecek TomasTomecek requested a review from nikromen January 24, 2024 10:01
@jpodivin jpodivin merged commit 7b72942 into fedora-copr:main Jan 24, 2024
2 checks passed
@TomasTomecek TomasTomecek deleted the koji-build-logs branch January 24, 2024 12:50
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.

3 participants