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

feat: add a base parser LazyLogFileOutput #4309

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

xiangce
Copy link
Contributor

@xiangce xiangce commented Dec 17, 2024

  • Doesn't like the LogFileOutput, this LazyLogFileOutput doesn't load the
    content during initialization. Its content will be loaded later whenever
    the parser instance being used.
  • It's useful for the cases where need to load thousands of files that
    belong to one single Spec in one pass of running.
  • For implementation's convenience, converted the "scanners" from list
    dict in which the result_key is key and scanner is value. And
    removed the scanner_keys.
  • Updated the LsPci accordingly.
  • see RHINENG-13810

All Pull Requests:

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • No Sensitive Data in this change?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

  • As some passive updates done by black pre-commit
    were also committed in this PR, please majorly check this
    code slice which is for this change.

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.17%. Comparing base (952f219) to head (7e9f0b1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4309   +/-   ##
=======================================
  Coverage   77.17%   77.17%           
=======================================
  Files         765      765           
  Lines       41753    41770   +17     
  Branches     8815     8821    +6     
=======================================
+ Hits        32221    32238   +17     
  Misses       8464     8464           
  Partials     1068     1068           
Flag Coverage Δ
unittests 77.16% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangce xiangce requested a review from JoySnow December 17, 2024 05:48
@xiangce xiangce marked this pull request as ready for review December 17, 2024 05:48
@xiangce xiangce changed the title refactor: lazy content loading for LogFileOutput fead: add a base parser LazyLogFileOutput Dec 17, 2024
@xiangce xiangce force-pushed the lazy_logfile branch 5 times, most recently from 578c682 to ddfab60 Compare December 17, 2024 14:01
- Doesn't like the LogFileOutput, the LazyLogFileOutput doesn't load the
  content during initialization, its content can only be loaded via calling
  the `do_scan` method explicitly.
- It's useful for the cases which need to load thousands of files belongs
  to one single Spec in one pass of running.
- For implementation's convenience, converted the "scanners" from `list`
  `dict` in which the `result_key` is key and `scanner` is value.  And
  removed the `scanner_keys`.
- Update the LsPci accordingly.
- see RHINENG-13810

Signed-off-by: Xiangce Liu <[email protected]>
@xiangce xiangce changed the title fead: add a base parser LazyLogFileOutput feat: add a base parser LazyLogFileOutput Dec 17, 2024
Signed-off-by: Xiangce Liu <[email protected]>
Signed-off-by: Xiangce Liu <[email protected]>
@xiangce xiangce merged commit 1597f13 into RedHatInsights:master Dec 19, 2024
13 checks passed
@xiangce xiangce deleted the lazy_logfile branch December 19, 2024 01:44
xiangce added a commit that referenced this pull request Jan 2, 2025
- Doesn't like the LogFileOutput, this LazyLogFileOutput doesn't load the
 content during initialization.  Its content will be loaded later whenever
 the parser instance being used.
- It's useful for the cases where need to load thousands of files that
  belong to one single Spec in one pass of running.
- For implementation's convenience, converted the `"scanners"` from `list`
  `dict` in which the `result_key` is key and `scanner` is value.  And
  removed the `scanner_keys`.
- Updated the LsPci accordingly.
- RHINENG-13810

Signed-off-by: Xiangce Liu <[email protected]>
(cherry picked from commit 1597f13)
xiangce added a commit that referenced this pull request Jan 2, 2025
- Doesn't like the LogFileOutput, this LazyLogFileOutput doesn't load the
 content during initialization.  Its content will be loaded later whenever
 the parser instance being used.
- It's useful for the cases where need to load thousands of files that
  belong to one single Spec in one pass of running.
- For implementation's convenience, converted the `"scanners"` from `list`
  `dict` in which the `result_key` is key and `scanner` is value.  And
  removed the `scanner_keys`.
- Updated the LsPci accordingly.
- RHINENG-13810

Signed-off-by: Xiangce Liu <[email protected]>
(cherry picked from commit 1597f13)
(cherry picked from commit f2850e9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants