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

fix: add filter to dependency datasource only #3949

Merged
merged 0 commits into from
Nov 14, 2023
Merged

Conversation

xiangce
Copy link
Contributor

@xiangce xiangce commented Nov 8, 2023

  • when add_filter to component (parser or combiner),
    add the filters to the datasource that the component
    actually depends on
  • and add relevant tests

All Pull Requests:

Check all that apply:

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

Complete Description of Additions/Changes:

Copy link
Collaborator

@JoySnow JoySnow left a comment

Choose a reason for hiding this comment

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

Just saw this MR, and made some tests in my local. This fix works as expected. @xiangce, 👍 .

# adding filters:
add_filter(Specs.yum_log, 'Add filter to Specs.yum_log')
add_filter(DefaultSpecs.yum_log, 'Add filter to DefaultSpecs.yum_log')
add_filter(YumLog, 'Add filter to parsers.yumlog.YumLog')

# generated "insights/filters.yaml":
...
insights.specs.Specs.yum_log:
- Add filter to Specs.yum_log
- Add filter to parsers.yumlog.YumLog
- 'Erased:'
- 'Installed:'
- 'Updated:'
insights.specs.default.DefaultSpecs.yum_log:
- Add filter to DefaultSpecs.yum_log

Copy link
Contributor

@ryan-blakley ryan-blakley left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@xiangce xiangce merged commit 26abad6 into master Nov 14, 2023
@xiangce xiangce deleted the filter_component branch November 14, 2023 01:06
xiangce added a commit that referenced this pull request Nov 14, 2023
- when add_filter to component (parser or combiner),
  add the filters to the datasource on which the component
  directly depends
- add relevant tests

Signed-off-by: Xiangce Liu <xiangceliu@redhat.com>
(cherry picked from commit 26abad6)
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.

Duplicate "filters" to Specs.spec_name and DefaultSpecs.spec_name in "filters.yaml"
3 participants