Skip to content

Trigger LD for the correct buildArch taskID#3071

Merged
centosinfra-prod-github-app[bot] merged 1 commit intopackit:mainfrom
Jany26:ld-koji-fix-task-ids-urls
Mar 24, 2026
Merged

Trigger LD for the correct buildArch taskID#3071
centosinfra-prod-github-app[bot] merged 1 commit intopackit:mainfrom
Jany26:ld-koji-fix-task-ids-urls

Conversation

@Jany26
Copy link
Contributor

@Jany26 Jany26 commented Mar 23, 2026

Instead of the parent task ID, we now pass the failed buildArch child task IDs.
This should prevent 404 errors when accessing logs at https://kojipkgs.fedoraproject.org/work/tasks/YYYY/XXXXYYYY/build.log.

Additionally, the CI reports are now consistent with other tasks, they include deployment and target-arch / chroot information.

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.
  • added rpm_build_task_states dictionary for arch -> task state lookup
  • we only trigger LD for failed buildArch subtasks
  • there might be an edge case possible, where the parent task (scratch build) fails, but no failed buildArch task is found -> this happens for a failed SRPM build
  • we might consider adding a fallback mechanism for this case where we would search for an SRPM build (the change is fairly simple -> we could add a 'srpm' to the rpm_build_task_ids and rpm_build_task_states)
  • hopefully the LDRunModel and LDRunGroupModel are correctly used
  • "target" field in the LDRunModel now contains not only build target, but also arch -> for distinguishing (perhaps this also needs a change into separate fields)

Fixes #3067

Related to #2971

RELEASE NOTES BEGIN

Packit now triggers LogDetective with the correct artifact URLs for failed downstream Koji scratch builds.
LogDetective CI jobs are now properly reported.

RELEASE NOTES END

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses the issue of triggering LogDetective with the parent Koji task ID instead of the correct child buildArch task IDs. The changes are consistent across the event definition, parser, handler, and helper, and the logic for iterating over failed subtasks is sound. The tests have also been updated appropriately to cover the new functionality. I have one suggestion for a minor refactoring to improve efficiency.

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch 3 times, most recently from a4ae17e to 1c68f10 Compare March 23, 2026 11:40
@centosinfra-prod-github-app
Copy link
Contributor

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from 1c68f10 to 4a52feb Compare March 23, 2026 11:45
@centosinfra-prod-github-app
Copy link
Contributor

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes overall look good, just few notes. Besides the code here, could you verify the reporting via commit status will work when processing the results from Log Detective? (i.e. there will be no status name collision)

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from 4a52feb to 557cfc9 Compare March 23, 2026 18:27
@centosinfra-prod-github-app
Copy link
Contributor

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from 557cfc9 to e84704f Compare March 23, 2026 18:51
@centosinfra-prod-github-app
Copy link
Contributor

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from e84704f to bd27c18 Compare March 24, 2026 08:02
@centosinfra-prod-github-app
Copy link
Contributor

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you!

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from bd27c18 to 15854fc Compare March 24, 2026 08:39
@centosinfra-prod-github-app
Copy link
Contributor

@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch 2 times, most recently from ed3bc12 to 854c42d Compare March 24, 2026 09:09
@centosinfra-prod-github-app
Copy link
Contributor

@jpodivin
Copy link
Contributor

The derivation of URL will be solved by #3075

- instead of the parent build target task
- also streamlined the CI reporting

Signed-off-by: Jan Matufka <jmatufka@redhat.com>
@Jany26 Jany26 force-pushed the ld-koji-fix-task-ids-urls branch from 854c42d to cb7d8e2 Compare March 24, 2026 12:20
@centosinfra-prod-github-app
Copy link
Contributor

@lbarcziova lbarcziova added the mergeit Merge via Zuul label Mar 24, 2026
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app centosinfra-prod-github-app bot merged commit 0423baf into packit:main Mar 24, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Packit pull requests Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

Projects

Development

Successfully merging this pull request may close these issues.

LogDetectiveKojiTriggerHelper is constructing invalid URL for Log Detective

4 participants