Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

Syncing build info data structure with logdetective - #36

Merged
jpodivin merged 1 commit into
fedora-copr:mainfrom
jpodivin:better_build_info
Apr 20, 2026
Merged

jpodivin merged 1 commit into
fedora-copr:mainfrom
jpodivin:better_build_info

Conversation

@jpodivin

@jpodivin jpodivin commented Apr 17, 2026 •

Copy link
Copy Markdown
Member

Changes introduced with agentic Log Detective API must be reflected in the in how interface server packages information coming in from packit. The PR also contains changes to tests and improved formatting of code snippets in README.md

Related: fedora-copr/logdetective#492

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

Copy link
Copy Markdown

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 introduces the BuildMetadata model and updates the artifact handling logic to support both URLs and raw content. The call_log_detective function now constructs a more comprehensive analysis request including these new fields. Feedback focuses on ensuring optional Pydantic fields have explicit defaults for proper serialization, correcting a test expectation mismatch regarding URL keys, and fixing a typo in a docstring.

Comment thread src/logdetective_packit/models.py
Comment thread tests/test_main.py
Comment thread src/logdetective_packit/models.py Outdated
Comment thread src/logdetective_packit/main.py

@Jany26 Jany26 left a comment

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.

Apart from Nikola's concern, LGTM.

Improving code snippet annotations

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
@jpodivin
jpodivin force-pushed the better_build_info branch from 66dd813 to 5fbfb00 Compare April 20, 2026 07:48
@jpodivin
jpodivin merged commit 36ac68f into fedora-copr:main Apr 20, 2026
3 checks passed
centosinfra-prod-github-app Bot added a commit to packit/packit-service that referenced this pull request Apr 20, 2026
Submit more files to Log Detective for analysis

References to multiple artifacts are now used when asking Log Detective for analysis.
Since we can not be completely sure about their availability, all URLs are checked using get request.
If no artifacts pass the check, the trigger fails and the information is logged.
In order to avoid references to files that can't be possibly analyzed by Log Detective, only URLs pointing to files of the text/plain type are allowed, all others are dropped from the final request.
This check should see more use as we interact with other build backends, and submit artifacts other than just logs.
New tests for the verify_artifact were introduced and existing tests adjusted.
Merge after

fedora-copr/logdetective-packit#36
fedora-copr/logdetective#492

RELEASE NOTES BEGIN
Packit now sends build.log, root.log and mock_output.log from failed Koji builds to Log Detective.
RELEASE NOTES END

Reviewed-by: gemini-code-assist[bot]
Reviewed-by: Nikola Forró
Reviewed-by: Jiří Podivín
Reviewed-by: Laura Barcziová

This branch was previously deployed

1 inactive deployment
quay — 5fbfb006 Deployed Apr 20, 2026 by jpodivin via build #117
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants