Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1714925
Summary: | KeyError: 'anonymous' | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Kamil Páral <kparal> |
Component: | fedora-easy-karma | Assignee: | Till Maas <opensource> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 30 | CC: | alciregi, cserpentis, gtwilliams, jimtahu, lewk, mhroncok, opensource, rbarlow, renault, till |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | fedora-easy-karma-0-0.41.20181206gitb6d97e0.fc30 fedora-easy-karma-0-0.41.20181206gitb6d97e0.fc29 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-07-04 01:55:08 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Kamil Páral
2019-05-29 08:19:24 UTC
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. *** 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. |