Bug #35610
closedContent view filter will include module streams of other repos/arches if the errata contain rpms in multiple repos/arches.
Description
Description of problem:
As per subject.
Steps to Reproduce:
1. Enable and sync RHEL 8 Baseos and Appstream x86_64 repos
2. Create a content view and add both repos
3. Create the following filters.
Include errata until end date = 26/07/2022
Include all module streams without errata
Include all packages without errata
4. Publish the content view. The results should have the following number of module streams.
593 Module streams
5. Enable and sync RHEL 8 Baseos and Appstream ppcle64 repos. Wait until the sync finish.
6. Publish new version of the content view.
Actual results:
Module streams count almost doubled up as below. Clicks into the module streams link you will see many ppcle64 module streams in the content view.
1094 Module streams
Expected results:
Module streams count remain 593
Additional info:
Same issue in Satellite 6.10
This is because Katello uses "api.repositories_api.modify(repository_href, add_content_units: content_unit_href)" API in the Pulp3 to copy contents. This API can copy any contents without specifying the source repository.
Satellite 6.9.9 doesn't have this issue because Katello uses the copy API in pulp 2 to copy units from source repo to destination repos. Thus, units not in the source repo can't be copied.