syncing a repo with an erratum without an updated date results in a bad date in published metadata
- create a repo and remote pointing to https://fixtures.pulpproject.org/rpm-advisory-no-update-date/repodata/
- sync the remote, create a publication and distribution
- examine the repodata, look for the Bird erratum section of the updateinfo xml:
<update from="email@example.com" status="stable" type="security" version="1"> <id>RHEA-2012:0056</id> <title>Bird_Erratum</title> <issued date="2013-01-27 16:08:08"/> <updated date="0693-02-18 07:00:00"/>
Note that the date is nonsense. this causes an issue for things trying to consumer this date, such as katello or another pulp server trying to sync
Updated by dalley almost 3 years ago
@Justin, do we know of any repositories in the wild where the updated_date field doesn't exist? Basically, is it valid or malformed repodata?
I did some testing and found that while there are deficiencies in Pulp that we can fix, they are not actually the cause of this problem. It looks like createrepo_c has problems with this. I wrote modified one of the createrepo_c test cases and printed the resulting XML and I found the exact same problem.
<update from="from" status="status" type="type" version="version"> <id>id</id> <title>title</title> <issued date="2021-01-28 00:59:17"/> <updated date="6449-03-17 07:00:00"/> <rights>rights</rights> <release>release</release> <pushcount>pushcount</pushcount> <severity>severity</severity> <summary>summary</summary> <description>description</description> <solution>solution</solution> <reboot_suggested>True</reboot_suggested> <references/> <pkglist/> </update>
You can see that even though they check whether it's a datetime type or None, they don't actually handle the case where it is None.
If it's valid metadata, the next step would be to file a BZ with createrepo_c.