#1896 Pagure has been sending issue.assigned.added messages with assignee = None
Closed: Fixed 2 years ago Opened 3 years ago by puiterwijk.

Example message:

{u'raw_msg': {u'body': {u'username': u'git', u'certificate': u'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVTRENDQTdHZ0F3SUJBZ0lDQWZzd0RRWUpL\nb1pJaHZjTkFRRUZCUUF3Z2FBeEN6QUpCZ05WQkFZVEFsVlQKTVFzd0NRWURWUVFJRXdKT1F6RVFN\nQTRHQTFVRUJ4TUhVbUZzWldsbmFERVhNQlVHQTFVRUNoTU9SbVZrYjNKaApJRkJ5YjJwbFkzUXhE\nekFOQmdOVkJBc1RCbVpsWkcxelp6RVBNQTBHQTFVRUF4TUdabVZrYlhObk1ROHdEUVlEClZRUXBF\nd1ptWldSdGMyY3hKakFrQmdrcWhraUc5dzBCQ1FFV0YyRmtiV2x1UUdabFpHOXlZWEJ5YjJwbFkz\nUXUKYjNKbk1CNFhEVEUxTURVeE9ERTNNamMxTTFvWERUSTFNRFV4TlRFM01qYzFNMW93Z2RZeEN6\nQUpCZ05WQkFZVApBbFZUTVFzd0NRWURWUVFJRXdKT1F6RVFNQTRHQTFVRUJ4TUhVbUZzWldsbmFE\nRVhNQlVHQTFVRUNoTU9SbVZrCmIzSmhJRkJ5YjJwbFkzUXhEekFOQmdOVkJBc1RCbVpsWkcxelp6\nRXFNQ2dHQTFVRUF4TWhjR0ZuZFhKbExYQmgKWjNWeVpUQXhMbVpsWkc5eVlYQnliMnBsWTNRdWIz\nSm5NU293S0FZRFZRUXBFeUZ3WVdkMWNtVXRjR0ZuZFhKbApNREV1Wm1Wa2IzSmhjSEp2YW1WamRD\nNXZjbWN4SmpBa0Jna3Foa2lHOXcwQkNRRVdGMkZrYldsdVFHWmxaRzl5CllYQnliMnBsWTNRdWIz\nSm5NSUdmTUEwR0NTcUdTSWIzRFFFQkFRVUFBNEdOQURDQmlRS0JnUUN5RXZjRndxWUkKUXg2OWpo\nSEJYekExVlpoT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d2l4cWxYN1pxc2cz\nMHIwNzgvUHNPTGRLTlo5VWR0QXJGUHZ2b3hQRHpsTTM4aUE9Ci0tLS0tRU5EIENFUlRJRklDQVRF\nLS0tLS0K\n', u'i': 2, u'timestamp': 1486837447, u'msg_id': u'2017-99240eaf-2eee-41c3-a2c9-451cbbd0929e', u'crypto': u'x509', u'topic': u'io.pagure.prod.pagure.issue.assigned.added', u'signature': u'r3ebrJFXbG3TfoJf/HlH+gNZq6V9nC3SJCfAomtGZeC4FXFZPsfXRV3nMV5yRErMPFahhbntJZ1V\nXgrtlKlfguZatAUMMWFkjJ6LWoAOv6VNKbpEcy3sv5sD38vcqweYaW31jiTutWAbb0ZQAl1CbQ7N\n4tua6WjmV9JPd5E7gCU=\n', u'msg': {u'project': {u'custom_keys': [], u'description': u'RPM macro/tools/junk for Rust', u'parent': None, u'tags': [u'rust'], u'settings': {u'issues_default_to_private': False, u'Minimum_score_to_merge_pull-request': -1, u'Web-hooks': None, u'project_documentation': False, u'always_merge': False, u'fedmsg_notifications': True, u'Enforce_signed-off_commits_in_pull-request': False, u'pull_requests': True, u'Only_assignee_can_merge_pull-request': False, u'issue_tracker': True}, u'namespace': u'fedora-rust', u'priorities': {}, u'id': 1665, u'milestones': {}, u'user': {u'fullname': u'Igor Gnatenko', u'name': u'ignatenkobrain'}, u'date_created': u'1485726556', u'close_status': [u'Fixed', u'Invalid', u'Duplicate', u'Insufficient Data'], u'name': u'rust2rpm'}, u'issue': {u'status': u'Closed', u'content': u"* Use %cargo_install_crate which should parse Cargo.toml?\r\n* Go further and use %cargo_install and automagically detect if it's library or binary and execute appropriate commands (`cargo install` or copy sources)\r\n\r\nI would prefer to go 2nd way...", u'blocks': [], u'title': u'%cargo_install_crate %{crate}-%{version} is too much boilerplate', u'tags': [], u'comments': [], u'close_status': u'Fixed', u'priority': None, u'assignee': None, u'depends': [], u'date_created': u'1485796703', u'private': False, u'milestone': None, u'last_updated': u'1486837445', u'closed_at': u'1486837445', u'id': 7, u'custom_fields': [], u'user': {u'fullname': u'Igor Gnatenko', u'name': u'ignatenkobrain'}}, u'agent': u'ignatenkobrain'}}, u'topic': u'io.pagure.prod.pagure.issue.assigned.added'}, u'context': u'email', u'recipients': [{u'triggered_by_links': True, u'markup_messages': False, u'verbose': True, u'filter_oneshot': False, u'filter_id': 32143, u'shorten_links': False, u'user': u'dtherhtun.id.fedoraproject.org', u'filter_name': u'Events referring to my username', u'email address': u'dthertun.cw@gmail.com'}]}

This breaks fedmsg-meta:

  File "/usr/lib/python2.7/site-packages/fmn/consumer/backend.py", line 190, in read
    backend.handle(session, recipient, raw_msg)
  File "/usr/lib/python2.7/site-packages/fmn/consumer/backends/mail.py", line 130, in handle
    content = fedmsg.meta.msg2long_form(msg, **self.config) or u''
  File "/usr/lib/python2.7/site-packages/fedmsg/meta/__init__.py", line 142, in __wrapper
    return f(msg, **config)
  File "/usr/lib/python2.7/site-packages/fedmsg/meta/__init__.py", line 161, in __wrapper
    return f(msg, processor=processor, **config)
  File "/usr/lib/python2.7/site-packages/fedmsg/meta/__init__.py", line 249, in msg2long_form
    result = processor.subtitle(msg, **config)
  File "/usr/lib/python2.7/site-packages/fedmsg_meta_fedora_infrastructure/pagure.py", line 234, in subtitle
    assignee = msg['msg']['issue']['assignee']['name']
exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'

This is a bug in fedmsg_meta rather than in pagure, so closing it here

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Metadata Update from @pingou:
- Issue close_status updated to: Invalid (was: Fixed)

3 years ago

Not quite, since fedmsg_meta also catches the assigned.reset that's supposed to catch the unassign case.
So assigned.added should only be that it was assigned to someone as far as I can read in the code.

Metadata Update from @puiterwijk:
- Issue status updated to: Open (was: Closed)

3 years ago

Metadata Update from @codeblock:
- Issue assigned to codeblock

2 years ago

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata