Commit graph

810 commits

Author SHA1 Message Date
Jennifer Richards 3b67d9e0fd
chore: Bump version to 12 in a couple places (#6789)
* chore: Bump version to 12 in a couple places

* ci: use semver-action to set dev major version

* feat: Extract version at runtime for dev

* fix: Use version/branch/hash vars

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2024-03-11 15:54:38 -05:00
Robert Sparks 4012a213c5
feat!: Version 11 based on Django 4 2023-05-23 11:25:28 -05:00
Robert Sparks a2f1c1f705
chore: update version in primary init (#5495) 2023-04-14 17:43:46 -05:00
Jennifer Richards 3705bedfcd
feat: Celery support and asynchronous draft submission API (#4037)
* ci: add Dockerfile and action to build celery worker image

* ci: build celery worker on push to jennifer/celery branch

* ci: also build celery worker for main branch

* ci: Add comment to celery Dockerfile

* chore: first stab at a celery/rabbitmq docker-compose

* feat: add celery configuration and test task / endpoint

* chore: run mq/celery containers for dev work

* chore: point to ghcr.io image for celery worker

* refactor: move XML parsing duties into XMLDraft

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.

* feat: add api_upload endpoint and beginnings of async processing

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.

* perf: index Submission table on submission_date

This substantially speeds up submission rate threshold checks.

* feat: remove existing files when accepting a new submission

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.

* refactor: make clear that deduce_group() uses only the draft name

* refactor: extract only draft name/revision in clean() method

Minimizing the amount of validation done when accepting a file. The
data extraction will be moved to asynchronous processing.

* refactor: minimize checks and data extraction in api_upload() view

* ci: fix dockerfiles to match sandbox testing

* ci: tweak celery container docker-compose settings

* refactor: clean up Draft parsing API and usage

  * 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

* feat: flesh out async submission processing

First basically working pass!

* feat: add state name for submission being validated asynchronously

* feat: cancel submissions that async processing can't handle

* refactor: simplify/consolidate async tasks and improve error handling

* feat: add api_submission_status endpoint

* refactor: return JSON from submission api endpoints

* refactor: reuse cancel_submission method

* refactor: clean up error reporting a bit

* feat: guard against cancellation of a submission while validating

Not bulletproof but should prevent

* feat: indicate that a submission is still being validated

* fix: do not delete submission files after creating them

* chore: remove debug statement

* test: add tests of the api_upload and api_submission_status endpoints

* test: add tests and stubs for async side of submission handling

* fix: gracefully handle (ignore) invalid IDs in async submit task

* test: test process_uploaded_submission method

* fix: fix failures of new tests

* refactor: fix type checker complaints

* test: test submission_status view of submission in "validating" state

* fix: fix up migrations

* fix: use the streamlined SubmissionBaseUploadForm for api_upload

* feat: show submission history event timestamp as mouse-over text

* fix: remove 'manual' as next state for 'validating' submission state

* refactor: share SubmissionBaseUploadForm code with Deprecated version

* fix: validate text submission title, update a couple comments

* chore: disable requirements updating when celery dev container starts

* feat: log traceback on unexpected error during submission processing

* feat: allow secretariat to cancel "validating" submission

* feat: indicate time since submission on the status page

* perf: check submission rate thresholds earlier when possible

No sense parsing details of a draft that is going to be dropped regardless
of those details!

* fix: create Submission before saving to reduce race condition window

* fix: call deduce_group() with filename

* refactor: remove code lint

* refactor: change the api_upload URL to api/submission

* docs: update submission API documentation

* test: add tests of api_submission's text draft consistency checks

* refactor: rename api_upload to api_submission to agree with new URL

* test: test API documentation and submission thresholds

* fix: fix a couple api_submission view renames missed in templates

* chore: use base image + add arm64 support

* ci: try to fix workflow_dispatch for celery worker

* ci: another attempt to fix workflow_dispatch

* ci: build celery image for submit-async branch

* ci: fix typo

* ci: publish celery worker to ghcr.io/painless-security

* ci: install python requirements in celery image

* ci: fix up requirements install on celery image

* chore: remove XML_LIBRARY references that crept back in

* feat: accept 'replaces' field in api_submission

* docs: update api_submission documentation

* fix: remove unused import

* test: test "replaces" validation for submission API

* test: test that "replaces" is set by api_submission

* feat: trap TERM to gracefully stop celery container

* chore: tweak celery/mq settings

* docs: update installation instructions

* ci: adjust paths that trigger celery worker image  build

* ci: fix branches/repo names left over from dev

* ci: run manage.py check when initializing celery container

Driver here is applying the patches. Starting the celery workers
also invokes the check task, but this should cause a clearer failure
if something fails.

* docs: revise INSTALL instructions

* ci: pass filename to pip update in celery container

* docs: update INSTALL to include freezing pip versions

Will be used to coordinate package versions with the celery
container in production.

* docs: add explanation of frozen-requirements.txt

* ci: build image for sandbox deployment

* ci: add additional build trigger path

* docs: tweak INSTALL

* fix: change INSTALL process to stop datatracker before running migrations

* chore: use ietf.settings for manage.py check in celery container

* chore: set uid/gid for celery worker

* chore: create user/group in celery container if needed

* chore: tweak docker compose/init so celery container works in dev

* ci: build mq docker image

* fix: move rabbitmq.pid to writeable location

* fix: clear password when CELERY_PASSWORD is empty

Setting to an empty password is really not a good plan!

* chore: add shutdown debugging option to celery image

* chore: add django-celery-beat package

* chore: run "celery beat" in datatracker-celery image

* chore: fix docker image name

* feat: add task to cancel stale submissions

* test: test the cancel_stale_submissions task

* chore: make f-string with no interpolation a plain string

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-08-22 13:29:31 -05:00
Nicolas Giard a32976c819
chore: set base dev version to 8.0.0-dev 2022-04-19 17:44:30 -04:00
Robert Sparks 2e373adcd2
feat: improve release information in footer. (#3738) 2022-03-30 11:53:07 -03:00
Nicolas Giard adc6331727
ci: inject release hash + branch during build 2022-03-21 14:45:10 -04:00
Nicolas Giard 90b28957bb
ci: fix __init__.py version quotes 2022-03-14 18:09:08 -04:00
Robert Sparks ff4c3e7d51 Set version info and settings back to development mode
- Legacy-Id: 19976
2022-02-24 03:05:51 +00:00
Robert Sparks 06b9da5f7d Set version info to release version 7.46.0 before branching.
- Legacy-Id: 19974
2022-02-24 03:05:41 +00:00
Robert Sparks 8fd6f33248 Set version info and settings back to development mode
- Legacy-Id: 19940
2022-02-15 14:51:32 +00:00
Robert Sparks cca8f006ee Set version info to release version 7.45.0 before branching.
- Legacy-Id: 19938
2022-02-15 14:51:23 +00:00
Robert Sparks bc4c5dcf39 Set version info and settings back to development mode
- Legacy-Id: 19890
2022-01-28 14:56:36 +00:00
Robert Sparks 699de9acb3 Set version info to release version 7.44.0 before branching.
- Legacy-Id: 19888
2022-01-28 14:56:23 +00:00
Robert Sparks eeb461fcaf Set version info and settings back to development mode
- Legacy-Id: 19870
2022-01-19 20:04:09 +00:00
Robert Sparks 233d7b43cc Set version info to release version 7.43.0 before branching.
- Legacy-Id: 19868
2022-01-19 20:04:01 +00:00
Robert Sparks 5bf0638c55 Set version info and settings back to development mode
- Legacy-Id: 19821
2022-01-07 15:23:40 +00:00
Robert Sparks 9255312c84 Set version info to release version 7.42.0 before branching.
- Legacy-Id: 19819
2022-01-07 15:23:32 +00:00
Robert Sparks 54fc0364c9 Set version info and settings back to development mode
- Legacy-Id: 19776
2021-12-10 16:30:35 +00:00
Robert Sparks 1497acf47c Set version info to release version 7.41.0 before branching.
- Legacy-Id: 19774
2021-12-10 16:30:28 +00:00
Robert Sparks 5c2765da94 Set version info and settings back to development mode
- Legacy-Id: 19688
2021-11-18 16:07:36 +00:00
Robert Sparks 8c697536bf Set version info to release version 7.40.0 before branching.
- Legacy-Id: 19686
2021-11-18 16:07:28 +00:00
Robert Sparks d6a262742f set version to 7.39.1.dev4
- Legacy-Id: 19645
2021-11-11 19:15:24 +00:00
Robert Sparks dd3447a7ad Update version and release coverage for 7.29.1.dev3
- Legacy-Id: 19602
2021-11-09 22:16:24 +00:00
Robert Sparks 66846bae22 A belated coverage update and version marking. This should have gone in before the .dev2 tag.
- Legacy-Id: 19598
2021-11-09 20:52:53 +00:00
Robert Sparks 24100b7f68 update coverage and tag init for 7.39.1.dev1
- Legacy-Id: 19538
2021-11-02 19:50:42 +00:00
Robert Sparks 3386e59a61 Set version info and settings back to development mode
- Legacy-Id: 19408
2021-10-08 16:26:33 +00:00
Robert Sparks dd60b4bfa6 Set version info to release version 7.39.0 before branching.
- Legacy-Id: 19406
2021-10-08 16:26:22 +00:00
Robert Sparks 58fa3218eb Set version info and settings back to development mode
- Legacy-Id: 19378
2021-09-20 16:38:37 +00:00
Robert Sparks c0b992889c Set version info to release version 7.38.0 before branching.
- Legacy-Id: 19376
2021-09-20 16:38:27 +00:00
Robert Sparks b531a5c3cc Set version info and settings back to development mode
- Legacy-Id: 19350
2021-09-06 15:57:53 +00:00
Robert Sparks 50e4af84d3 Set version info to release version 7.37.0 before branching.
- Legacy-Id: 19348
2021-09-06 15:57:44 +00:00
Robert Sparks 24ec2ffc42 Set version info and settings back to development mode
- Legacy-Id: 19291
2021-08-06 15:05:20 +00:00
Robert Sparks a9ad04c691 Set version info to release version 7.36.0 before branching.
- Legacy-Id: 19289
2021-08-06 15:05:11 +00:00
Robert Sparks c4753ed9b9 Set version info and settings back to development mode
- Legacy-Id: 19251
2021-07-21 17:45:14 +00:00
Robert Sparks 0d4c5c01c8 Set version info to release version 7.35.0 before branching.
- Legacy-Id: 19249
2021-07-21 17:45:06 +00:00
Robert Sparks 99830f3992 Set version info and settings back to development mode
- Legacy-Id: 19190
2021-07-02 14:28:49 +00:00
Robert Sparks e38296f19a Set version info to release version 7.34.0 before branching.
- Legacy-Id: 19188
2021-07-02 14:28:40 +00:00
Robert Sparks 058f007502 Set version info and settings back to development mode
- Legacy-Id: 19160
2021-06-25 15:57:13 +00:00
Robert Sparks 957afa9280 Set version info to release version 7.33.0 before branching.
- Legacy-Id: 19158
2021-06-25 15:57:05 +00:00
Robert Sparks 9a0d818490 Set version info and settings back to development mode
- Legacy-Id: 19115
2021-06-11 13:12:42 +00:00
Robert Sparks a83d60dd55 Set version info to release version 7.32.0 before branching.
- Legacy-Id: 19113
2021-06-11 13:12:33 +00:00
Robert Sparks c8ed251ae3 Set version info and settings back to development mode
- Legacy-Id: 19092
2021-06-06 14:57:19 +00:00
Robert Sparks f2a8940684 Set version info to release version 7.31.0 before branching.
- Legacy-Id: 19090
2021-06-06 14:57:09 +00:00
Robert Sparks bfad845662 Set version info and settings back to development mode
- Legacy-Id: 19017
2021-05-20 17:48:29 +00:00
Robert Sparks 8cb63ccb2c Set version info to release version 7.30.0 before branching.
- Legacy-Id: 19015
2021-05-20 17:48:20 +00:00
Robert Sparks a16f8c44d4 Set version info and settings back to development mode
- Legacy-Id: 18985
2021-05-11 16:28:23 +00:00
Robert Sparks 4659c22ef1 Set version info to release version 7.29.0 before branching.
- Legacy-Id: 18983
2021-05-11 16:28:03 +00:00
Robert Sparks 445f98d818 Set version info and settings back to development mode
- Legacy-Id: 18956
2021-04-15 14:54:15 +00:00
Robert Sparks 71977c3a08 Set version info to release version 7.28.0 before branching.
- Legacy-Id: 18954
2021-04-15 14:53:50 +00:00