Excluding packages from EPEL 7 (at least) causes all errata to disappear
Originating community thread: https://community.theforeman.org/t/katello-4-0-pulp3-no-erratas-anymore/23291/
With Pulp 3, when filtering out a package from EPEL 7 in a content view, all of the errata (from all repos in the content view) are filtered out as well. So far I haven't found another non-EPEL repository that this happens to. I tried filtering a package from the large RHEL 7 OS RPMs repo, and the errata stayed. It seems then that it might not be a problem of size, since EPEL 7 is pretty large too. I didn't try EPEL 8, but the user is reporting the same issue with it.
This issue occurs with all versions of Katello that have supported yum content on Pulp 3.
#4 Updated by Ian Ballou 9 months ago
This issue is occurring due to EPEL including errata that have packages that exist in different repositories. For the errata to exist in a content view version with filters, Katello must have all of its packages indexed. We've addressed this here: https://projects.theforeman.org/issues/33254
However, there is another bug that is likely causing this. One select erratum in EPEL 7 has these packages:
 pry(main)> ::Katello::Repository.find(151).errata.first.packages => [#<Katello::ErratumPackage:0x0000000010f9f550 id: 30406, erratum_id: 3549, nvrea: "mdns-scan-0.5-1.el7.ppc64le", name: "mdns-scan", filename: "mdns-scan-0.5-1.el7.ppc64le.rpm">, #<Katello::ErratumPackage:0x0000000010f9f140 id: 30403, erratum_id: 3549, nvrea: "mdns-scan-0.5-1.el7.src", name: "mdns-scan", filename: "mdns-scan-0.5-1.el7.src.rpm">, #<Katello::ErratumPackage:0x0000000010f9ead8 id: 30404, erratum_id: 3549, nvrea: "mdns-scan-0.5-1.el7.x86_64", name: "mdns-scan", filename: "mdns-scan-0.5-1.el7.x86_64.rpm">, #<Katello::ErratumPackage:0x0000000010f9e588 id: 30407, erratum_id: 3549, nvrea: "mdns-scan-debuginfo-0.5-1.el7.ppc64le", name: "mdns-scan-debuginfo", filename: "mdns-scan-debuginfo-0.5-1.el7.ppc64le.rpm">, #<Katello::ErratumPackage:0x0000000010f9e0d8 id: 30405, erratum_id: 3549, nvrea: "mdns-scan-debuginfo-0.5-1.el7.x86_64", name: "mdns-scan-debuginfo", filename: "mdns-scan-debuginfo-0.5-1.el7.x86_64.rpm">]
Note the source RPM in the list. Currently, we don't check for SRPMs in `filter_errata_by_pulp_href`. If an erratum has an SRPM in its package list, it'll never be listed. We need to check for these SRPMs as well.