The idea is to integrate LogJuicer into the Packit Service, it can easily pick the relevant part of logs for failed builds.
There is a web interface available, but it currently supports only Zuul and prow builds. There's also API which allows creation of the “reports”.
(for additional details see the original RFE at the end)
Subtasks
[x] Enable the LogJuicer on our own CI that uses Zuul
packit/packit-service-zuul#93
[ ] Research the possibility of extending the web interface to accept different sources of logs, such as Copr, Koji or Testing Farm.
[ ] If this option is not feasible, there is always a possibility of self-hosting…
[ ] Is it acceptable to pass URL which leads to compressed logs?
[ ] (open for discussion) Try to estimate the extent of the required changes to satisfy the following points
[ ] Integration with Packit Service
[ ] forges: relatively simple to integrate on GitHub, since Check Runs accept markdown; GitLab and Pagure (dist-git) might be worse, only one link is allowed
[ ] dashboard
[ ] simple scenario: link to the LogJuicer report
[ ] UX friendly scenario: allowing to switch between original logs and “juiced” logs
Caveats (open for discussion)
Is this work worth it in case we plan to integrate with the Log Detective which would render this feature less likely to be used in favor of the LLM solution?
Original RFE
### Description
[Logjuicer]() is a CLI tool and a webservice that can drastically reduce log sizes. This is mega useful for failed builds because it can remove 99% (not kidding) of lines that match a successful build so only fragements related to the failure remain.
[Logjuicer service](https://softwarefactory-project.io/logjuicer/) runs inside Software Factory Zuul and is integrated into the zuul environment.
Let's give it a shot on a failure of 'packit-tests-git-main-sess-rec' job:
![packit-tests-git-main-sess-rec failure](https://github.com/packit/dashboard/assets/1662493/df75aed3-a4ab-436e-8ae1-6f815e993ef3)
We're gonna enter the build URL in logjuicer:
![Logjuicer interface](https://github.com/packit/dashboard/assets/1662493/8d5f5a75-0a20-455e-a8bc-95f1465abb6c)
Pretty successful:
```
Target: zuul
Baselines: zuul
Created at: 2024-02-08 11:57:13
Run time: 0.05 sec
Result: 97.85% reduction (from 5871 to 126)
```
It's not 99 but still in the high nighties 😇
https://softwarefactory-project.io/logjuicer/report/104
We got the precise pytest stacktrace for the failed requre test:
![image](https://github.com/packit/dashboard/assets/1662493/1acb744a-ae01-4424-927c-7fb652d7e846)
The output is malformed since the shell escape sequences are not properly interpreted - that's true also for the raw text log file.
### Benefit
It will be easier to analyze logs of failed builds.
I'm not sure right now how the integration would work exactly.
@TristanCacqueray pointed me to the API of the webservice: https://github.com/logjuicer/logjuicer/tree/main/crates/web-service#api so in theory, we could do this on any logs if submit the baseline too.
Please share your ideas for start and we can then hop on a call and discuss there.
### Importance
_No response_
### Workaround
- [ ] There is an existing workaround that can be used until this feature is implemented.
### Participation
- [ ] I am willing to submit a pull request for this issue. (Packit team is happy to help!)
The idea is to integrate LogJuicer into the Packit Service, it can easily pick the relevant part of logs for failed builds.
There is a web interface available, but it currently supports only Zuul and prow builds. There's also API which allows creation of the “reports”.
(for additional details see the original RFE at the end)
Subtasks
Caveats (open for discussion)
Original RFE
### Description [Logjuicer]() is a CLI tool and a webservice that can drastically reduce log sizes. This is mega useful for failed builds because it can remove 99% (not kidding) of lines that match a successful build so only fragements related to the failure remain. [Logjuicer service](https://softwarefactory-project.io/logjuicer/) runs inside Software Factory Zuul and is integrated into the zuul environment. Let's give it a shot on a failure of 'packit-tests-git-main-sess-rec' job: ![packit-tests-git-main-sess-rec failure](https://github.com/packit/dashboard/assets/1662493/df75aed3-a4ab-436e-8ae1-6f815e993ef3) We're gonna enter the build URL in logjuicer: ![Logjuicer interface](https://github.com/packit/dashboard/assets/1662493/8d5f5a75-0a20-455e-a8bc-95f1465abb6c) Pretty successful: ``` Target: zuul