Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogJuicer integration #2345

Closed
1 of 12 tasks
mfocko opened this issue Feb 13, 2024 · 3 comments
Closed
1 of 12 tasks

LogJuicer integration #2345

mfocko opened this issue Feb 13, 2024 · 3 comments
Labels
complexity/epic Lost of work ahead, planning/design required.

Comments

@mfocko
Copy link
Member

mfocko commented Feb 13, 2024

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

  • Enable the LogJuicer on our own CI that uses Zuul
    Enable LogJuicer in 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 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

We're gonna enter the build URL in logjuicer:

Logjuicer interface

Pretty successful:

Target: zuul<job=packit-tests-git-main-sess-rec, project=packit/packit, branch=main, result=FAILURE>
Baselines: zuul<job=packit-tests-git-main-sess-rec, project=packit/packit, branch=main, result=SUCCESS>
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

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!)
@lachmanfrantisek lachmanfrantisek added the discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) label Feb 13, 2024
@majamassarini majamassarini added the complexity/epic Lost of work ahead, planning/design required. label Feb 15, 2024
@majamassarini
Copy link
Member

We take a look a this card again at the next quarter planning.

@majamassarini majamassarini removed the discuss discuss To be discussed within a team (usually on the so-called Architecture meeting next Thursday) label Feb 15, 2024
@mfocko mfocko removed their assignment Feb 22, 2024
@lachmanfrantisek
Copy link
Member

We don't need to work on this for now since Copr/LogDetective is looking into this field now and we don't need to duplicate our efforts.

@lachmanfrantisek
Copy link
Member

Let's close this in favour of #2689

@lachmanfrantisek lachmanfrantisek closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2025
@github-project-automation github-project-automation bot moved this from new to done in Packit Kanban Board Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity/epic Lost of work ahead, planning/design required.
Projects
Archived in project
Development

No branches or pull requests

3 participants