The websites team has been getting hourly failures from the syncDeveloper script. It's not clear what is calling this script or what it does. I'm guessing this is the Fedora Planet feed for developer.fedoraproject.org, but it's not clear.
Any idea where this script comes from, or more specifically: how to fix it. I'm trying to reduce the deletable email so we can better notice actual failures (like the error in parsing the Fedora Magazine RSS for start.fedoraproject.org).
Traceback (most recent call last): File "/usr/local/bin/rss.py", line 46, in <module> author, title = item.title.split(':', 1) ValueError: need more than 1 value to unpack
Oh...someday.
It looks to be for the developer.fedoraproject.org website.
The script of the cron job is at: https://pagure.io/fedora-infra/ansible/blob/master/f/roles/developer/build/files/syncDeveloper.sh
The rss.py script is also there, so we should be able to fix the code directly
The fix could potentially be as simple as:
diff --git a/ roles/developer/build/files/rss.py b/ roles/developer/build/files/rss.py index 294cad1f2..03701ad6d 100644 --- a/roles/developer/build/files/rss.py +++ b/roles/developer/build/files/rss.py @@ -43,6 +43,8 @@ for feed in map(feedparser.parse, FedMag): <div class="col-sm-6 blog-headlines"> """ item.title = item.title.replace("&", "&") + if not ":" in item.title: + continue author, title = item.title.split(':', 1) link = item.links[0]['href'] # Remove image tag from beginning
but I'm not available right now to push it and test it, feel free to if you can :)
It's slightly more complicated than that. Your proposed fix will resolve the failures (which has resolved itself since the offending Planet post has fallen far enough down the stack) but has some impact on how the final page is rendered.
I have a slightly more comprehensive fix that I need to test a little more and then I'll submit a PR for it.
Metadata Update from @mohanboddu: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: groomed, medium-gain, medium-trouble, ops
Ansible pr 215 contains a fix. Arguably, this script should be pushed upstream to live with the rest of the developer.fp.o content, but that's a matter for another day (and another me).
Metadata Update from @pingou: - Issue assigned to bcotton
Thanks for the merge! Looks like it's working as expected.
Metadata Update from @bcotton: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.