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: enhance add_filter to support the max matched lines #4303

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

xiangce
Copy link
Contributor

@xiangce xiangce commented Dec 12, 2024

  • Added a new keyword argument "max_match=MAX_MATCH" to add_filter.
    By declaring the max_match, at most max_match number of lines that
    contain the patterns will be filtered out in the collection.
    For redundant declarations the maximum max_match will be kept as the
    final scanning number. If no max_match is declared when add_filter,
    the filters.MAX_MATCH (=10000) will be take as the default value.
  • Added a new keyword argument "with_matches=False" to the get_filters.
    When "with_matches=True" is specified, the return value of the
    get_filters will be dict in which the max scanning numbers for each
    filter pattern are included as the dict value.
  • update the exiting tests
  • RHINENG-14669

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:

Add your description here

@xiangce
Copy link
Contributor Author

xiangce commented Dec 12, 2024

It depends on #4299. Please do not review it yet.

@codecov-commenter
Copy link

codecov-commenter commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.98%. Comparing base (dbc93e3) to head (8e03f6a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4303   +/-   ##
=======================================
  Coverage   76.97%   76.98%           
=======================================
  Files         735      735           
  Lines       41300    41306    +6     
  Branches     8770     8772    +2     
=======================================
+ Hits        31791    31799    +8     
  Misses       8441     8441           
+ Partials     1068     1066    -2     
Flag Coverage Δ
unittests 76.97% <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 added the QE label Dec 20, 2024
@xiangce xiangce force-pushed the add_filter_with_count branch 3 times, most recently from d670896 to 6282e36 Compare December 25, 2024 08:20
@xiangce xiangce marked this pull request as ready for review December 25, 2024 08:20
@xiangce xiangce requested a review from JoySnow December 25, 2024 08:20
@xiangce xiangce force-pushed the add_filter_with_count branch 6 times, most recently from 776f4e4 to 81aba8c Compare December 30, 2024 06:02
- added a new keyword argument "max_match=MAX_MATCH" to `add_filter`.
  By declaring the max_match, at most `max_match` number of lines that
  contain the patterns will be filtered out in the collection.
  For redundant declarations the maximum `max_match` will be kept as the
  final scanning number.  If no `max_match` is declared when `add_filter`,
  the filters.MAX_MATCH (=10000) will be take as the default value.
- added a new keyword argument "with_matches=False" to the `get_filters`.
  When "with_matches=True" is specified, the return value of the
  `get_filters` will be dict in which the max scanning numbers for each
  filter pattern are included as the dict value.
- update the exiting tests
- RHINENG-14669

Signed-off-by: Xiangce Liu <[email protected]>
@xiangce xiangce force-pushed the add_filter_with_count branch from 81aba8c to 02c9dbb Compare December 30, 2024 08:05
@xiangce
Copy link
Contributor Author

xiangce commented Jan 2, 2025

test me

@xiangce xiangce force-pushed the add_filter_with_count branch 2 times, most recently from dde8128 to e46cab8 Compare January 2, 2025 09:42
@xiangce xiangce force-pushed the add_filter_with_count branch from e46cab8 to 8e03f6a Compare January 2, 2025 09:58
@xiangce
Copy link
Contributor Author

xiangce commented Jan 3, 2025

I confirmed with perf-scale team, and got that these CPT jenkins failures were caused by Jenkins migration is still WIP, the same test on old jenkins are passed see https://master-jenkins-csb-perf.apps.ocp-c1.prod.psi.redhat.com/job/InsightsInsightsCore_runner/

And this PR also got PASS in the verification on QE end see RHINENG-15025

Merging it.

@xiangce xiangce merged commit 9c64871 into RedHatInsights:master Jan 3, 2025
12 of 16 checks passed
@xiangce xiangce deleted the add_filter_with_count branch January 3, 2025 09:47
xiangce added a commit that referenced this pull request Jan 9, 2025
- added a new keyword argument "max_match=MAX_MATCH" to `add_filter`.
  By declaring the max_match, at most `max_match` number of lines that
  contain the patterns will be filtered out in the collection.
  For redundant declarations the maximum `max_match` will be kept as the
  final scanning number.  If no `max_match` is declared when `add_filter`,
  the filters.MAX_MATCH (=10000) will be taken as the default value.
- added a new keyword argument "with_matches=False" to the `get_filters`.
  When "with_matches=True" is specified, the return value of the
  `get_filters` will be dict in which the max scanning numbers for each
  filter pattern are included as the dict value.
- update the exiting tests
- RHINENG-14669

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

Successfully merging this pull request may close these issues.

3 participants