Skip to content

feat: email ingestion API#7342

Merged
rjsparks merged 23 commits intoietf-tools:mainfrom
jennifer-richards:post-mail
Apr 23, 2024
Merged

feat: email ingestion API#7342
rjsparks merged 23 commits intoietf-tools:mainfrom
jennifer-richards:post-mail

Conversation

@jennifer-richards
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

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
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 27, 2024
@jennifer-richards jennifer-richards deleted the post-mail branch July 12, 2024 14:06
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.

2 participants