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

Fixes #30352 - Add an original mod streams filter #8825

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented Jul 9, 2020

This commit allows module streams filters to include Module Streams that
do not belong to any errata. This is especially useful when used in
conjunction with rpm filters.

For more context:

Original in this context applies to modules that were originally there before
errata started coming.
We use --original-packages for rpm that are not part of any errata.

This commit adds --original-module-streams for module streams that are not part of errata.

Module filters introduced a flaw in master.

Since we did not have this --original-module-streams flag,
if you did any sort of errata filtering you'd not get modules that do not belong to any errata
Many customers want ->

  1. All the content in the base +
  2. Security errata up until a specified date in their cve
    so their filters are written the same way

This PR aims to fix the above scenario

@theforeman-bot
Copy link

Issues: #30352

@parthaa parthaa changed the title WIP- [Fixes #30352 - Add an original mod streams filter] Fixes #30352 - Add an original mod streams filter Jul 9, 2020
@parthaa parthaa force-pushed the modularity-filter-no-errata branch from fc908eb to fce4550 Compare July 13, 2020 13:58
@parthaa parthaa force-pushed the modularity-filter-no-errata branch from fce4550 to fa8185a Compare July 13, 2020 17:43
@parthaa
Copy link
Contributor Author

parthaa commented Jul 13, 2020

  1. Add AppStream to a CV 01 - Repositories_for_Content_View_cv
  2. Create an includes filter - 02 - New_Filter_for_Content_View_cv
  3. Select the modules with no errata checkbox - 03 - Select_for_Content_View_cv
  4. Publish and check the results 04 - Publish-Result
  5. Checkout if the published version has modular errata (it should not) - 05 - Version Details

Also should be able to do this via hammer

hammer-cli-katello]$ hammer content-view filter update --id=2 --help
Usage:
    hammer content-view filter update [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                  Content view name to search by
 --content-view-id CONTENT_VIEW_ID                 Content view numeric identifier
 --description DESCRIPTION                         Description of the filter
 --id ID                                           Filter identifier
 --inclusion INCLUSION                             Specifies if content should be included or excluded, default: inclusion=false
                                                   One of true/false, yes/no, 1/0.
 --name NAME                                       Name to search by
 --new-name NEW_NAME                               New name for the filter
 --organization ORGANIZATION_NAME                  Organization name to search by
 --organization-id ORGANIZATION_ID                 Organization ID to search by
 --organization-label ORGANIZATION_LABEL           Organization label to search by
 --original-module-streams ORIGINAL_MODULE_STREAMS Add all module streams without errata to the included/excluded list. (module stream filter only)
                                                   One of true/false, yes/no, 1/0.
 --original-packages ORIGINAL_PACKAGES             Add all packages without errata to the included/excluded list. (package filter only)
                                                   One of true/false, yes/no, 1/0.
 --repositories REPOSITORY_NAMES                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                   JSON is acceptable and preferred way for complex parameters
 --repository-ids REPOSITORY_IDS                   List of repository ids
                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                   JSON is acceptable and preferred way for complex parameters
 -h, --help                                        Print help


hammer-cli-katello]$ hammer content-view filter update --id=2 --original-module-streams=0
Filter updated.

@parthaa parthaa force-pushed the modularity-filter-no-errata branch 2 times, most recently from 28dce7b to 5102700 Compare July 14, 2020 12:53
@sjha4
Copy link
Member

sjha4 commented Jul 14, 2020

Test results with different filters with and without Include all Module Streams with no errata checkbox.


Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
Packages:
Total: 11772
Non-modular: 8355
Modular: 3417

Module Streams:
Total : 191

Errata:
Total: 730
Modular: 116
Non-modular: 614

5746875796553728


The functionality is as advertised. Will Ack after playing around some more in a little bit.

@sjha4
Copy link
Member

sjha4 commented Jul 14, 2020

Works correctly with different filters with the test repo pteradactyl..
5631477172404224

Will do 1 quick round of hammer testing..

Copy link
Member

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

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

Screenshot from 2020-07-14 12-43-48

Able to set/unset the new flag via hammer. Looks good to me..APJ.. 👍

@sjha4
Copy link
Member

sjha4 commented Jul 14, 2020

Just a couple nitpicks..

@parthaa parthaa force-pushed the modularity-filter-no-errata branch 3 times, most recently from d11513c to 508ac6d Compare July 14, 2020 21:06
This commit allows module streams filters to include Module Streams that
do not belong to any errata. This is especially useful when used in
conjunction with rpm filters.

Refs #30352 - reverting b58687e

For more context:

`Original` in this context applies to modules that were originally
there before errata started coming.
We use `--original-packages` for rpm that are not part of any errata.

This commit adds `--original-module-streams` for module streams that
are not part of errata.

Module filters introduced a  flaw in master.

Since we did not have this --original-module-streams flag,
if you did any sort of errata filtering you'd not get modules that
do not belong to any errata

Many customers want ->
1. All the content in the base +
2. Security errata up until a specified date in their cve
so their filters are written the same way

This commit aims to fix this scenario
@parthaa parthaa force-pushed the modularity-filter-no-errata branch from 508ac6d to 4802779 Compare July 14, 2020 23:22
@parthaa parthaa merged commit 2364a76 into Katello:master Jul 15, 2020
@parthaa parthaa deleted the modularity-filter-no-errata branch July 15, 2020 01:26
piyushtiw pushed a commit to piyushtiw/katello that referenced this pull request Jul 16, 2020
This commit allows module streams filters to include Module Streams that
do not belong to any errata. This is especially useful when used in
conjunction with rpm filters.

Refs #30352 - reverting b58687e

For more context:

`Original` in this context applies to modules that were originally
there before errata started coming.
We use `--original-packages` for rpm that are not part of any errata.

This commit adds `--original-module-streams` for module streams that
are not part of errata.

Module filters introduced a  flaw in master.

Since we did not have this --original-module-streams flag,
if you did any sort of errata filtering you'd not get modules that
do not belong to any errata

Many customers want ->
1. All the content in the base +
2. Security errata up until a specified date in their cve
so their filters are written the same way

This commit aims to fix this scenario
ianballou pushed a commit to ianballou/katello that referenced this pull request Jul 30, 2020
This commit allows module streams filters to include Module Streams that
do not belong to any errata. This is especially useful when used in
conjunction with rpm filters.

Refs #30352 - reverting b58687e

For more context:

`Original` in this context applies to modules that were originally
there before errata started coming.
We use `--original-packages` for rpm that are not part of any errata.

This commit adds `--original-module-streams` for module streams that
are not part of errata.

Module filters introduced a  flaw in master.

Since we did not have this --original-module-streams flag,
if you did any sort of errata filtering you'd not get modules that
do not belong to any errata

Many customers want ->
1. All the content in the base +
2. Security errata up until a specified date in their cve
so their filters are written the same way

This commit aims to fix this scenario

(cherry picked from commit 2364a76)
ianballou pushed a commit that referenced this pull request Jul 30, 2020
This commit allows module streams filters to include Module Streams that
do not belong to any errata. This is especially useful when used in
conjunction with rpm filters.

Refs #30352 - reverting b58687e

For more context:

`Original` in this context applies to modules that were originally
there before errata started coming.
We use `--original-packages` for rpm that are not part of any errata.

This commit adds `--original-module-streams` for module streams that
are not part of errata.

Module filters introduced a  flaw in master.

Since we did not have this --original-module-streams flag,
if you did any sort of errata filtering you'd not get modules that
do not belong to any errata

Many customers want ->
1. All the content in the base +
2. Security errata up until a specified date in their cve
so their filters are written the same way

This commit aims to fix this scenario

(cherry picked from commit 2364a76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants