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

feat: email ingestion API #7342

Merged
merged 23 commits into from Apr 23, 2024
Merged

Conversation

jennifer-richards
Copy link
Member

This adds an http API for accepting and ingesting emails. Supports IANA review, IPR response, and nomcom feedback email ingestion. For IPR and nomcom messages, email is sent to admins (or nomcom chair, if possible) to notify them of the failure. This is not done for IANA - it could be, but the old script did not have that feature so I've not added it.

The rather baroque EmailOnFailureCommand features are mirrored in a similarly baroque EmailIngestionError class and its handling in the ingest_email() view. This is intended to allow for consistent handling of these email forwards. Having gone through the exercise of implementing it and writing tests for it, I'm not thoroughly convinced that it's actually making things better. It has the very desirable feature of being already written, though.

The message format for the API calls is defined by a JSON schema - it's

{"dest": "...", "message": "<base64-encoded message>"}

for ipr-response and iana-review dests and

{"dest": "...", "message": "<base64-encoded message>", "year": 2024}

for nomcom-feedback dest.

rjsparks
rjsparks previously approved these changes Apr 22, 2024
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 94.21488% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 88.85%. Comparing base (187c2c5) to head (9dbfcc3).
Report is 103 commits behind head on main.

Files Patch % Lines
ietf/api/views.py 92.68% 6 Missing ⚠️
ietf/sync/iana.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7342      +/-   ##
==========================================
- Coverage   88.98%   88.85%   -0.14%     
==========================================
  Files         291      291              
  Lines       40717    41028     +311     
==========================================
+ Hits        36233    36456     +223     
- Misses       4484     4572      +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rjsparks rjsparks merged commit 0616b07 into ietf-tools:main Apr 23, 2024
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2024
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.

None yet

2 participants