Skip to content

Add information about Log Detective runs into API#3075

Open
jpodivin wants to merge 1 commit intopackit:mainfrom
jpodivin:log_dective_api
Open

Add information about Log Detective runs into API#3075
jpodivin wants to merge 1 commit intopackit:mainfrom
jpodivin:log_dective_api

Conversation

@jpodivin
Copy link
Contributor

This also add the get_logdetective_info_url helper function. This isn't immediately useful, but it will be necessary for linking results.

RELEASE NOTES BEGIN

Log Detective results are now displayed on the dashboard.

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 introduces a new API for Log Detective runs, including new endpoints to retrieve details for individual runs and run groups, and integrates Log Detective run information into the existing Copr and Koji build APIs. It also updates URL generation to support string IDs for Log Detective results. The review comments suggest several improvements, including refactoring duplicated code for retrieving Log Detective runs into a shared utility function, adhering to the logging style guide by initializing loggers with logging.getLogger(__name__), removing an unused config variable, improving the specificity of an error message, ensuring consistent enum handling by explicitly using .value, correcting an inaccurate docstring, and removing redundant type casting for an integer ID parameter.

)
from packit_service.service.api.utils import get_project_info_from_build, response_maker

logger = logging.getLogger("packit_service")
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

According to the repository's style guide (lines 494-498), loggers must be initialized with logging.getLogger(__name__).

Suggested change
logger = logging.getLogger("packit_service")
logger = logging.getLogger(__name__)
References
  1. Logger must be initialized from logging library with: logging.getLogger(__name__) (link)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically correct, but in this case the established pattern is something else.

@centosinfra-prod-github-app
Copy link
Contributor

@jpodivin jpodivin force-pushed the log_dective_api branch 2 times, most recently from 6707d97 to 9ef217b Compare March 23, 2026 18:08
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
@centosinfra-prod-github-app
Copy link
Contributor

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.

2 participants