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

fix: improve person selection when receiving IANA email #3993

Merged
merged 2 commits into from
May 20, 2022

Conversation

rjsparks
Copy link
Member

No description provided.

@rjsparks
Copy link
Member Author

Misconfiguration (in the form of two identical Alias records pointing to the same Person) led to this fail:

Remote Server returned '554 5.3.0 < #5.3.0 x-unix; Traceback (most recent call last): File "<elided>/ietf/bin/iana-review-email", line 25, in <module> doc_name, review_time, by, comment = parse_review_email(msg) File "<elided>/web/ietf/sync/iana.py", line 254, in parse_review_email by = Person.objects.get(alias__name=name, role__group__acronym="iana") File "<elided>/web/env/lib64/python3.9/site-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "<elided>/web/env/lib64/python3.9/site-packages/django/db/models/query.py", line 410, in get raise self.model.MultipleObjectsReturned( ietf.person.models.MultipleObjectsReturned: get() returned more than one Person -- it returned 2!>'

The data has been repaired. This fix would have allowed the code to succeed. There are corners the code does not handle, but they are obscure enough to continue to risk. It would produce unexpected results if we gave two people with the same Alias roles in the IANA group. If that ever arises, the code or data would need adjusting.

@rjsparks rjsparks merged commit 49cf639 into ietf-tools:main May 20, 2022
@rjsparks rjsparks deleted the harden-iana-emailreader branch May 20, 2022 21:30
@UbaisAli
Copy link

Ubi

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants