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

When saving a traceback, shorten very large locals #3468

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

happz
Copy link
Collaborator

@happz happz commented Jan 14, 2025

A traceback in log.txt can be very large, especially when saving locals like a huge set of result or junit XML. Adding a level of traceback verbosity, locals, which will log locals, but shorten the very long ones. full will keep showing everything on terminal.

Pull Request Checklist

  • implement the feature
  • write the documentation

@happz happz added this to the 1.42 milestone Jan 14, 2025
@happz happz force-pushed the trim-locals-in-tracebacks branch from 1134196 to b62b592 Compare January 14, 2025 15:16
Copy link
Collaborator

@lukaszachy lukaszachy left a comment

Choose a reason for hiding this comment

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

Just a nitpick about the value, otherwise LGTM

tmt/utils/__init__.py Show resolved Hide resolved
@happz happz force-pushed the trim-locals-in-tracebacks branch from b62b592 to 5e7de3f Compare January 16, 2025 13:04
Copy link
Collaborator

@thrix thrix left a comment

Choose a reason for hiding this comment

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

LGTM

@thrix thrix added ci | full test Pull request is ready for the full test execution documentation Improvements or additions to documentation code | utils Various utility functions and classes used across the code and removed documentation Improvements or additions to documentation labels Jan 21, 2025
@thrix
Copy link
Collaborator

thrix commented Jan 21, 2025

/packit test

@happz happz force-pushed the trim-locals-in-tracebacks branch from 5e7de3f to 769d50b Compare January 21, 2025 20:56
@thrix thrix requested a review from lukaszachy January 26, 2025 15:03
@happz happz force-pushed the trim-locals-in-tracebacks branch from 769d50b to 1f188de Compare January 27, 2025 10:00
@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Jan 27, 2025
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

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

Just one typo, fine to ignore.

tmt/utils/__init__.py Outdated Show resolved Hide resolved
@psss psss force-pushed the trim-locals-in-tracebacks branch from f858acd to 791c377 Compare January 27, 2025 14:44
happz and others added 3 commits January 28, 2025 10:20
A traceback in `log.txt` can be very large, especially when saving
locals like a huge set of result or junit XML. Adding a level of
traceback verbosity, `locals`, which will log locals, but shorten the
very long ones. `full` will keep showing everything on terminal.
Co-authored-by: Petr Šplíchal <psplicha@redhat.com>
@happz happz force-pushed the trim-locals-in-tracebacks branch from 791c377 to 3d8ff5b Compare January 28, 2025 09:20
@thrix thrix enabled auto-merge (squash) January 28, 2025 11:02
@thrix thrix merged commit cb2c31e into main Jan 28, 2025
20 checks passed
@thrix thrix deleted the trim-locals-in-tracebacks branch January 28, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution code | utils Various utility functions and classes used across the code status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants