Description of problem: With the release of bodhi 4.0, there's no longer support for anonymous comments, and the API changed. FEK now crashes every time. $ fedora-easy-karma Getting list of installed packages... Waiting for Bodhi for a list of packages in updates-testing (F30)... Fetching updates page 2 of 12 ... Fetching updates page 12 of 12 found 286 testing updates Traceback (most recent call last): File "/usr/bin/fedora-easy-karma", line 851, in <module> fek = FedoraEasyKarma() File "/usr/bin/fedora-easy-karma", line 628, in __init__ self.already_commented(update, self.options.fas_username): File "/usr/bin/fedora-easy-karma", line 776, in already_commented if not comment["anonymous"] and comment["user"]["name"] == user: KeyError: 'anonymous' Version-Release number of selected component (if applicable): fedora-easy-karma-0-0.40.20181206gitb6d97e0.fc30.noarch How reproducible: always
Does using the Bodhi 4 client from https://copr.fedorainfracloud.org/coprs/bowlofeggs/bodhi/ fix this or does this need code changes in fedora-easy-karma? Can you maybe test it?
Replacing both comment["anonymous"] with comment.get("anonymous", False) workarounds the immediate issue. But that just leads to: Traceback (most recent call last): File "/usr/bin/fedora-easy-karma", line 851, in <module> fek = FedoraEasyKarma() File "/usr/bin/fedora-easy-karma", line 656, in __init__ update["submitter"] == self.options.fas_username: KeyError: 'submitter'
An update dict now looks like this: {'alias': 'FEDORA-2019-ac3a8134ef', 'autokarma': True, 'bugs': [], 'builds': [{'epoch': 0, 'nvr': '389-ds-base-1.4.1.3-1.fc30', 'release_id': 28, 'signed': True, 'type': 'rpm'}], 'close_bugs': True, 'comments': [{'bug_feedback': [], 'id': 950165, 'karma': 0, 'karma_critpath': 0, 'testcase_feedback': [], 'text': 'This update has been submitted for testing by ' 'mreynolds. ', 'timestamp': '2019-05-24 20:46:05', 'update_id': 139937, 'user': {'avatar': 'https://apps.fedoraproject.org/img/icons/bodhi-24.png', 'email': None, 'groups': [], 'id': 91, 'name': 'bodhi', 'openid': 'bodhi.id.fedoraproject.org'}, 'user_id': 91}, {'bug_feedback': [], 'id': 950416, 'karma': 0, 'karma_critpath': 0, 'testcase_feedback': [], 'text': 'This update has been pushed to testing.', 'timestamp': '2019-05-25 01:52:03', 'update_id': 139937, 'user': {'avatar': 'https://apps.fedoraproject.org/img/icons/bodhi-24.png', 'email': None, 'groups': [], 'id': 91, 'name': 'bodhi', 'openid': 'bodhi.id.fedoraproject.org'}, 'user_id': 91}], 'compose': None, 'content_type': 'rpm', 'critpath': False, 'date_approved': None, 'date_modified': None, 'date_pushed': '2019-05-25 01:50:41', 'date_stable': None, 'date_submitted': '2019-05-24 20:46:05', 'date_testing': '2019-05-25 01:50:41', 'display_name': '', 'karma': 0, 'locked': False, 'meets_testing_requirements': False, 'notes': 'Bump version to 1.4.1.3', 'pushed': True, 'release': {'branch': 'f30', 'candidate_tag': 'f30-updates-candidate', 'composed_by_bodhi': True, 'composes': [], 'dist_tag': 'f30', 'id_prefix': 'FEDORA', 'long_name': 'Fedora 30', 'mail_template': 'fedora_errata_template', 'name': 'F30', 'override_tag': 'f30-override', 'pending_signing_tag': 'f30-signing-pending', 'pending_stable_tag': 'f30-updates-pending', 'pending_testing_tag': 'f30-updates-testing-pending', 'stable_tag': 'f30-updates', 'state': 'current', 'testing_tag': 'f30-updates-testing', 'version': '30'}, 'request': None, 'require_bugs': True, 'require_testcases': True, 'requirements': '', 'severity': 'unspecified', 'stable_karma': 1, 'status': 'testing', 'suggest': 'unspecified', 'test_cases': [{'name': 'QA:Testcase 389 ds base setup testcase', 'package_id': 377}, {'name': 'QA:Testcase Create normalized dn cache testcase', 'package_id': 377}, {'name': 'QA:Testcase Create normalized dn cache testcase2', 'package_id': 377}], 'test_gating_status': 'ignored', 'title': '389-ds-base-1.4.1.3-1.fc30', 'type': 'bugfix', 'unstable_karma': -1, 'updateid': 'FEDORA-2019-ac3a8134ef', 'url': 'https://bodhi.fedoraproject.org/updates/FEDORA-2019-ac3a8134ef', 'user': {'avatar': 'https://seccdn.libravatar.org/avatar/91c229394c868a53f7014d94442b38fd77a2e060a07eeaa6c0d562c86b25c24e?s=24&d=retro', 'email': 'mreynolds', 'groups': [Munch({'name': 'packager'})], 'id': 1553, 'name': 'mreynolds', 'openid': 'mreynolds.id.fedoraproject.org'}}
Miro, ['submitter'] can be replaced with ['user']['name'], and I think that will actually also be compatible with the Bodhi 3 server which is a nice bonus. The problem with the proposal to assume anonymous is False is that Bodhi server does still retain historic anonymous comments and it will incorrectly mark those as false in the client. You can tell they are anonymous still by looking for the username 'anonymous' as the author of the comment, which would be a more complete fix.
Also this is very likely a Bodhi bug and not a f-e-k bug. See https://bugzilla.redhat.com/show_bug.cgi?id=1714950. We likely want to close this and track it over there.
FEDORA-2019-352078fd2b has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-352078fd2b
FEDORA-2019-5ce9adadc1 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-5ce9adadc1
bodhi-4.0.2-1.fc30, bodhi3-3.14.0-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-352078fd2b
bodhi-4.0.2-1.fc29, bodhi3-3.12.0-200.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-5ce9adadc1
(In reply to Fedora Update System from comment #6) > FEDORA-2019-352078fd2b has been submitted as an update to Fedora 30. > https://bodhi.fedoraproject.org/updates/FEDORA-2019-352078fd2b This does not fix this particular traceback.
Oh I see why - I didn't notice that Bodhi code is actually not in the traceback - it looks like f-e-k itself is expecting the anonymous key, which is no longer part of the Bodhi API in Bodhi 4. I will unmark the updates as fixing this, and sorry for the confusion!
It's this line: https://pagure.io/fedora-easy-karma/blob/master/f/fedora-easy-karma.py#_193 Bodhi no longer has anonymous comments, so I think we can just drop that code from there. If you want to process historic comments, the "anonymous" username can be used to detect them.
https://pagure.io/fedora-easy-karma/pull-request/8
*** Bug 1716043 has been marked as a duplicate of this bug. ***
FEDORA-2019-27bac720d8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-27bac720d8
FEDORA-2019-793e240ce0 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-793e240ce0
fedora-easy-karma-0-0.41.20181206gitb6d97e0.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
fedora-easy-karma-0-0.41.20181206gitb6d97e0.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-793e240ce0
fedora-easy-karma-0-0.41.20181206gitb6d97e0.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.