From the logs of this cron job running, it appears that every now and then
a request to pagure isn't returning JSON data. Could be because the server
got restarted in the middle or something else.
The result is however the same, the request's data can't be converted to
JSON.
This commit is an addition to 0db6035454 which
was already taking care of a similar issue but when retrieving project
information, this one is for retrieving groups information.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
Basically, if we fail to retrieve data from pagure or we fail to
convert from JSON, wait for 30 seconds and retry.
If after two minutes (4 attempts) it still hasn't worked, bail.
Fixes https://pagure.io/fedora-infrastructure/issue/7603
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
As part of the Modularity project, we've decided that we need to have different package
branches with different lifecycles. To read more about this, please view this document:
https://fedoraproject.org/wiki/Infrastructure/Factory2/Focus/ArbitraryBranching. To enable
this, we've decided to rely on Pagure and PDC for package information instead of PkgDB.
This commit is an attempt to modify an existing script that queried PkgDB and FAS for packager
emails with one that uses the new architecture described above.
Also, instead of querying FAS for email information, we've decided to use the email alias
USER@fedoraproject.org. This will be a performance increase and protect us against FAS API
changes.