Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when constructing drop message #330

Closed
Zlopez opened this issue Jun 3, 2021 · 0 comments · Fixed by #331
Closed

Error when constructing drop message #330

Zlopez opened this issue Jun 3, 2021 · 0 comments · Fixed by #331

Comments

@Zlopez
Copy link
Contributor

Zlopez commented Jun 3, 2021

I found this issue today on staging instance of the-new-hotness. It looks like we are hitting some corner case in hotness_schema.

[2021-06-03 18:48:18,605 hotness.hotness_consumer INFO] Handling anitya msg 'a69a0bdf-75ba-43ab-8bba-43b091a87fc7'
[2021-06-03 18:48:18,605 hotness.hotness_consumer INFO] No 'Fedora' mapping for 'dart'. Dropping.
[2021-06-03 18:48:18,605 hotness.notifiers.fedora_messaging INFO] publishing topic 'hotness.update.drop'
[2021-06-03 18:48:18,606 hotness.use_cases.notify_user_use_case ERROR] Notify user use case failure
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/hotness/notifiers/fedora_messaging.py", line 93, in notify
    msg = message_class(topic=topic, body=body)
  File "/usr/lib/python3.8/site-packages/fedora_messaging/message.py", line 318, in __init__
    self._properties = properties or self._build_properties(headers)
  File "/usr/lib/python3.8/site-packages/fedora_messaging/message.py", line 328, in _build_properties
    headers.update(self._filter_headers())
  File "/usr/lib/python3.8/site-packages/fedora_messaging/message.py", line 348, in _filter_headers
    for package in self.packages:
  File "/usr/local/lib/python3.8/site-packages/hotness_schema/messages.py", line 106, in packages
    set(
KeyError: 'pop from an empty set'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/hotness/use_cases/notify_user_use_case.py", line 56, in notify
    result = self.notifier.notify(
  File "/usr/local/lib/python3.8/site-packages/hotness/notifiers/fedora_messaging.py", line 102, in notify
    output["msg_id"] = msg.id
UnboundLocalError: local variable 'msg' referenced before assignment
Zlopez added a commit to Zlopez/the-new-hotness that referenced this issue Jun 4, 2021
When reason for the update.drop message is Anitya, it means that Anitya
doesn't have mapping for the package. Use the project name instead for
creating summary of the package.

Fixes fedora-infra#330

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez added a commit that referenced this issue Jun 4, 2021
When reason for the update.drop message is Anitya, it means that Anitya
doesn't have mapping for the package. Use the project name instead for
creating summary of the package.

Fixes #330

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant