1- # logdetective-packit
1+ # logdetective-packit
22
33[ ![ Run pytest] ( https://github.com/fedora-copr/logdetective-packit/actions/workflows/pytest.yml/badge.svg )] ( https://github.com/fedora-copr/logdetective-packit/actions/workflows/pytest.yml ) [ ![ Container Image Build and Publish] ( https://github.com/fedora-copr/logdetective-packit/actions/workflows/image_publish.yml/badge.svg )] ( https://github.com/fedora-copr/logdetective-packit/actions/workflows/image_publish.yml )
44
55Server providing interface between [ Packit] ( https://packit.dev/ ) and [ Log Detective] ( https://github.com/fedora-copr/logdetective ) using [ Fedora
66messaging infrastructure] ( https://docs.fedoraproject.org/en-US/infra/developer_guide/messaging/ ) .
7-
7+
88Requests sent to ` /analyze ` enpoint are routed to Log Detective server
99with URL set by ` LD_URL ` environment variable. Eventual response is
1010posted on the public fedora messaging under ` logdetective.analysis ` topic,
@@ -18,16 +18,32 @@ The endpoint expects a JSON payload matching the `BuildInfo` model:
1818```
1919{
2020 "logs": {
21- "builder-live.log": "http://example.com/logs/123/ builder-live.log",
21+ "builder-live.log": "http://example.com/builder-live.log",
2222 "backend.log": "http://example.com/logs/123/backend.log"
2323 },
24- "build_id": "12345"
24+ "target_build": "12345",
25+ "build_system": "copr",
26+ "commit_sha": "9deb98c730bb4123f518ca13a0dbec5d7c0669ca",
27+ "project_url": "www.logdetective.com",
28+ "pr_id": 1
2529}
2630```
2731
2832logs (dict): A dictionary mapping log filenames to their full URL.
2933
30- build_id (str): A unique identifier for the build, which will be included in the message.
34+ target_build (str): A unique identifier for the build, which will be included in the message.
35+
36+ build_system (str): Name of the build system used, in practice either ` copr ` or ` koji `
37+
38+ commit_sha (str): Hash of the commit from which the build was created
39+
40+ project_url (str): URL of the project the build is for
41+
42+ pr_id (int): Identifier of the pull request, or equivalent
43+
44+ Of these values, only ` logs ` are used by Log Detective itself.
45+ The rest is used as part of a message sent to Fedora Messaging infrastructure,
46+ to identify results.
3147
3248## Run the container
3349
@@ -43,7 +59,7 @@ and then run the container:
4359```
4460podman run -d --name logdetective-packit \
4561 -p 8090:8090 \
46- -e LD_URL="https. logdetective.example.com/api" \
62+ -e LD_URL="https:// logdetective.example.com/api" \
4763 logdetective-packit:latest
4864```
4965
0 commit comments