Skip to content

Support reading split files in Python#607

Open
atenart wants to merge 5 commits intomainfrom
at/python-rotate
Open

Support reading split files in Python#607
atenart wants to merge 5 commits intomainfrom
at/python-rotate

Conversation

@atenart
Copy link
Contributor

@atenart atenart commented Mar 2, 2026

Some pre-requisites required to convey the rotation config down to the Python helpers. This is actually improving things for all users.

@atenart atenart added this to the v1.7 milestone Mar 2, 2026
@atenart atenart added the run-functional-tests Request functional tests to be run by CI label Mar 2, 2026
@atenart atenart changed the title Support reading split files in the Python sub-command Support reading split files in Python Mar 2, 2026
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 16.90141% with 59 lines in your changes missing coverage. Please review.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #607      +/-   ##
==========================================
- Coverage   37.12%   37.10%   -0.03%     
==========================================
  Files         111      111              
  Lines       13370    13381      +11     
  Branches    13370    13381      +11     
==========================================
+ Hits         4964     4965       +1     
- Misses       8025     8036      +11     
+ Partials      381      380       -1     
Flag Coverage Δ
aarch64 ?
x86_64 37.10% <16.90%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atenart atenart force-pushed the at/python-rotate branch from b812d09 to bf4c787 Compare March 3, 2026 09:59
atenart added 5 commits March 3, 2026 11:02
Provide an event file representation in the events crate directly, to allow
bundling a path with attributes (e.g. how it should be used wrt the rotation
policy).

Use it in InputDataFile and in FileEventsFactory (allowing to embed to rotation
vs non-rotation logic directly).

Signed-off-by: Antoine Tenart <atenart@redhat.com>
Add support from reading rotated event files from PyEventFile and PyEventReader.
We use class methods to provide alternative constructors.

Signed-off-by: Antoine Tenart <atenart@redhat.com>
Signed-off-by: Antoine Tenart <atenart@redhat.com>
Signed-off-by: Antoine Tenart <atenart@redhat.com>
Handling the file name fallback from {file} to {file}.0 in the "library"
(retis-events) is not common: the RotationReader and its helpers are magically
handling things in a non-deterministic way. Such choice (the fallback) should
instead be done at the consumer level, in the Retis option parsing logic.

Signed-off-by: Antoine Tenart <atenart@redhat.com>
@atenart atenart force-pushed the at/python-rotate branch from bf4c787 to 55e6027 Compare March 3, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-functional-tests Request functional tests to be run by CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant