Project

General

Profile

Actions

Bug #35191

closed

Email notification shows incorrect new errata after syncing an Epel repository

Added by Hao Yu over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2105299

Description of problem:
I found that 130 errata in the Epel 8 repository always reported as new Errata in the summary of the email notification. Same issue is also observed in Epel 7 repository.

This is caused by the discrepancy between the Pulp update records and the Katello errata records.

1. Some Errata in EPEL repo have trailing whitespace in the description field. Katello strips the trailing whitespace and save the errata into the DB. When comparing this field, both of them don't match due to the trailing whitespace so consider as updated.

Example:


#Katello DB
{
  "errata_id"=>"FEDORA-EPEL-2021-3d5da78e55",
  "title"=>"openssh-ldap-authkeys-0.1.0~git20200205.aee4c46-2.el8",
  "description"=>"Initial packaging for Fedora",
}

#Pulp update record
{
  "errata_id"=>"FEDORA-EPEL-2021-3d5da78e55",
  "title"=>"openssh-ldap-authkeys-0.1.0~git20200205.aee4c46-2.el8",
  "description"=>"Initial packaging for Fedora\n",   <================ Trailing whitespace.
}

2. Some Errata in EPEL have none standard long title. Katello limits the Errata title to 255 characters and will truncate the rest. When comparing this field, both of them don't match so consider as updated.

Example:

#Katello DB
{
  "errata_id"=>"FEDORA-EPEL-2021-b87459fd6f",
  "title"=>"certbot-1.22.0-1.el8 python-acme-1.22.0-1.el8 python-certbot-apache-1.22.0-1.el8 python-certbot-dns-cloudflare-1.22.0-1.el8 python-certbot-dns-cloudxns-1.22.0-1.el8 python-certbot-dns-digitalocean-1.22.0-1.el8 python-certbot-dns-dnsimple-1.22.0-1.el8 p...",  <============== Truncated
  "description"=>"update to 1.22.0",
}

#Pulp update record
{
  "errata_id"=>"FEDORA-EPEL-2021-b87459fd6f" 
  "title"=>"certbot-1.22.0-1.el8 python-acme-1.22.0-1.el8 python-certbot-apache-1.22.0-1.el8 python-certbot-dns-cloudflare-1.22.0-1.el8 python-certbot-dns-cloudxns-1.22.0-1.el8 python-certbot-dns-digitalocean-1.22.0-1.el8 python-certbot-dns-dnsimple-1.22.0-1.el8 python-certbot-dns-dnsmadeeasy-1.22.0-1.el8 python-certbot-dns-gehirn-1.22.0-1.el8 python-certbot-dns-google-1.22.0-1.el8 python-certbot-dns-linode-1.22.0-1.el8 python-certbot-dns-luadns-1.22.0-1.el8 python-certbot-dns-nsone-1.22.0-1.el8 python-certbot-dns-ovh-1.22.0-1.el8 python-certbot-dns-rfc2136-1.22.0-1.el8 python-certbot-dns-route53-1.22.0-1.el8 python-certbot-dns-sakuracloud-1.22.0-1.el8 python-certbot-nginx-1.22.0-1.el8", 
  "description"=>"update to 1.22.0",
}

Steps to Reproduce:
1. Login and subscribe the user to sync errata email.
2. Create a repository to sync Epel 8 repository. Url: https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
3. Sync the repository and you should get an email notification which will report all errata as new (excluding some unknown Fedora errata types).
4. Do a complete sync and wait for the task to finish.

Actual results:
Received and email notification reporting 130 new errata.

Expected results:
Should not send email notification because there is no new errata.

Additional info:
The discrepancy mentioned above also happened in Satellite 6.9.9 but it is reporting the new errata correctly because Satellite 6.9.9 won't update the RepositoryErratum association. It will only create new RepositoryErratum association for new errata.

Actions

Also available in: Atom PDF