Skip to content

feat: Celery support and asynchronous draft submission API#4037

Merged
rjsparks merged 111 commits intoietf-tools:mainfrom
painless-security:jennifer/submit-async
Aug 22, 2022
Merged

feat: Celery support and asynchronous draft submission API#4037
rjsparks merged 111 commits intoietf-tools:mainfrom
painless-security:jennifer/submit-async

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

@jennifer-richards jennifer-richards commented May 31, 2022

This rather large pull request adds support for Celery asynchronous task handling and uses this to implement an asynchronous draft submission API.

The new API has two endpoints. Most of it is in api_submission(), which is a refactored and slightly renamed api_submit(). The other piece is api_submission_status(), which provides a way to check whether a submission is still in the new validating state.

For development, docker containers for rabbitmq and the celery worker are started up alongside the app and db containers. The celery container is currently pulled from the github package repo under the painless-security fork, to be changed when this is merged. That docker image is based on the existing test image.

Fixes #3791. Fixes #3286.

Move some PlaintextDraft methods into the Draft base class and
implement for the XMLDraft class. Use xml2rfc code from ietf.submit
as a model for the parsing.

This leaves some mismatch between the PlaintextDraft and the Draft
class spec for the get_author_list() method to be resolved.
This adds an api_upload() that behaves analogously to the api_submit()
endpoint. Celery tasks to handle asynchronous processing are added but
are not yet functional enough to be useful.
This substantially speeds up submission rate threshold checks.
After checking that a submission is not in progress, remove any files
in staging that have the same name/rev with any extension. This should
guard against stale files confusing the submission process if the
usual cleanup fails or is skipped for some reason.
Minimizing the amount of validation done when accepting a file. The
data extraction will be moved to asynchronous processing.
  * remove get_draftname() from Draft api; set filename during init
  * further XMLDraft work
    - remember xml_version after parsing
    - extract filename/revision during init
    - comment out long broken get_abstract() method
  * adjust form clean() method to use changed API
First basically working pass!
jennifer-richards and others added 26 commits July 14, 2022 18:05
Will be used to coordinate package versions with the celery
container in production.
Setting to an empty password is really not a good plan!
@rjsparks rjsparks merged commit 3705bed into ietf-tools:main Aug 22, 2022
@jennifer-richards jennifer-richards deleted the jennifer/submit-async branch August 22, 2022 19:37
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 26, 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.

gateway timeout results in half-posted document Add replaces to submissions API

4 participants