Skip to content

Display Log Detective jobs/runs triggered by the same action on the same line - #544

Open
Jany26 wants to merge 3 commits into
packit:mainfrom
Jany26:group-ld-jobs
Open

Jany26 wants to merge 3 commits into
packit:mainfrom
Jany26:group-ld-jobs

Conversation

@Jany26

@Jany26 Jany26 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

The default [Log Detective] display on the dashboard will now be utilizing the new api/log-detective/groups/ defined in packit/packit-service#3191.
I also moved some info to the detailed view, see images below.

EDIT: Updated the images.

Tested locally with a mock api serving the modified data.


The first image triggers GET .../api/log-detective/groups?page=1&per_page=10:
image


The second image triggers GET .../api/log-detective/{ID}:
image

Merge after packit/packit-service#3191 is in prod.

RELEASE NOTES BEGIN

Log Detective runs are now grouped by trigger on the overview page.

RELEASE NOTES END

@centosinfra-prod-github-app

Copy link
Copy Markdown

@centosinfra-prod-github-app

Copy link
Copy Markdown

submitted_time: number | null;
run_ids: number[];
log_detective_target_ids: number[];
log_detective_targets: LogDetectiveTarget[];

@betulependule betulependule Sep 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unless I'm mistaken, I think that you also need to replace log_detective_target_ids with log_detective_targets in LogDetectiveGroup.tsx. VS Code is complaining that log_detective_target_ids does not exist on type LogDetectiveGroup in that file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah forgot to fix this, but I feel like the group view is now redundant anyway, so I'll remove it completely. thx

centosinfra-prod-github-app Bot added a commit to packit/packit-service that referenced this pull request Sep 23, 2026
)

Add endpoint for displaying multiple groups of log detective runs

Adding /api/log-detective/groups?page=X&per_page=Y endpoint (works similarly to /api/log-detective/) that shows multiple groups of Log Detective runs
This is to improve the dashboard readability, so that we can show the Log Detective runs from the same trigger on the same line.
I opted to not modify the original endpoint, but dashboard is probably the only consumer.
Merge before packit/dashboard#544
RELEASE NOTES BEGIN
Exposing an endpoint to get a list of groups of Log Detective runs.
RELEASE NOTES END

Reviewed-by: Jiří Podivín
Reviewed-by: Matej Focko
</Td>
<Td dataLabel={columnNames.commitSha}>
{log_detective_result.commit_sha}
{group.commit_sha?.slice(0, 7)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering whether we could use the SHACopy component here. This just displays the commit SHA, but using SHACopy would create a clickable button next to it to enable users to copy it to clipboard very easily.

It is used for example here (both the trigger and commit SHA are below the "Koji Build Results" title)
https://dashboard.packit.dev/jobs/koji/46990

It might be nice to do this similarly for the "Log Detective Results" (to display both the trigger and commit SHA below the title), but I'm fine with keeping it the way it is if that's the visual look that what you prefer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

agreed

The default list display /jobs/log-detective is now using
/api/log-detective/groups endpoint (with same page, per_page args).
Also shift margins to leave more space for target buttons.

Signed-off-by: Jan Matufka <jmatufka@redhat.com>
Things like commit SHA, target arch and trigger link are displayed in
list, and probably should also be displayed in the detail view.

Signed-off-by: Jan Matufka <jmatufka@redhat.com>
Signed-off-by: Jan Matufka <jmatufka@redhat.com>
@centosinfra-prod-github-app

Copy link
Copy Markdown

@Jany26

Jany26 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@jpodivin couple of new changes based on some nice ideas from review:

  • LD job detail view now uses commit sha link and trigger as a sub-heading, similar to other dashboard modules (see updated images in PR desc)
  • removed /log-detective/group/{id} view since it is basically redundant now with the changes, I don't know if anyone uses the view for anything, see below:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

5 participants