Commit graph

11386 commits

Author SHA1 Message Date
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
Robert Sparks 17786527d4
fix: allow 90m session requests. Prompt for cannot meet at time reasoning. (#4345)
* fix: allow 90m session requests. Prompt for cannot meet at time reasoning.

* test: adjust tests to match new acts_like_wg default.
2022-08-19 09:11:44 -05:00
Nicolas Giard 822a572589
feat: diff crawl docker tool (#4310)
* feat: diff docker tool (wip)

* feat: diff docker tool - download + extract from github

* feat: diff docker tool - pull + create + shutdown containers

* feat: diff docker tool - start app containers + execute prepare script

* fix: many fixes + run target instance server

* feat: diff docker tool - run crawl + options

* fix: diff docker tool - various fixes

* feat: diff docker tool - add tag + commit fetch options

* feat: diff docker tool - handle log save + more options

* feat: diff docker tool - F10 quit option + better exec display + checklist fixes

* fix: diff docker tool - remove latest release option
2022-08-18 12:28:47 -05:00
Kesara Rathnayake 1869d375c4
fix: Update idnits service URL (#4330)
This change introduces a new configuration option: `IDNITS_SERVICE_URL`
to configure idnits service URL.
2022-08-18 12:25:44 -05:00
Robert Sparks c0f1fd2395
chore: update to pytz 2022.2.1 (#4342) 2022-08-18 11:40:51 -05:00
Robert Sparks aa2f843725
chore: track updates to pytz (#4319) 2022-08-12 15:14:46 -05:00
Robert Sparks 0f703a695e
fix: correctly render wg shepherd writeups and test it. (#4316) 2022-08-11 16:21:52 -05:00
Robert Sparks 6a4142e3d0
feat: Area director workload summary view (#4315)
* feat: Add new page as requested in #4242 to list all area directors
and their current workload. Include links to the specific dashboards
for each area director. This new page is in doc/ad/.

* feat: Add new page as requested in #4242 to list all area directors
and their current workload. Include links to the specific dashboards
for each area director. This new page is in doc/ad/.

* Fixed issues from the previous commit by renaming hash to get_hash.

* Making outer () to be non matching

* Fixed RFC Ed Queue Internet-Draft to RFC Ed Queue

* refactor: split the /ad view apart from the /ad/name view.

* fix: make the new template html valid.

* test: start building a test for the new view

* refactor: make the view testable and test it.

* chore: remove unneeded commented lines

* fix: avoid parenthsized-string-looks-like-tuple bug.

* fix: repair bad closing tag in template

Co-authored-by: Tero Kivinen <kivinen@iki.fi>
2022-08-11 15:24:29 -05:00
Robert Sparks c7c366fd41
chore: remove session_purpose_demo mgmt command. Fixes #4290. (#4309) 2022-08-04 11:25:57 -05:00
Robert Sparks 9c236ea2a2
chore: remove unneeded logging and code marked unreachable that has not been reached. (#4305)
* chore: remove unneeded logging and code marked unreachable that has not been reached.

* fix: remove noop save override
2022-08-04 11:25:31 -05:00
Robert Sparks c95679a03b
test: align tests with code changes from #4297. (#4307) 2022-08-02 16:08:30 -05:00
Lars Eggert beab785903
fix: Remove unicode encode from CVS row writer (#4294)
Fixes #4292
2022-08-02 10:23:53 -05:00
Robert Sparks 1b64231e98
test: Convert interleaved migration failure to a warning. (#4301) 2022-08-02 10:23:12 -05:00
Lars Eggert 73931c2ed7
fix: Move Meetecho buttons to separate button group (#4295)
Fixes #4288
2022-08-02 10:20:26 -05:00
Lars Eggert cdb4769a73
fix: Don't require a responsible AD to be identified for new status change (#4297)
Fixes #4159
2022-08-01 09:51:09 -05:00
Lars Eggert 58b4649aef
fix: Show Zulip room URL (#4296). Fixes #4269 2022-07-29 15:42:07 -05:00
Lars Eggert d3d75c1a8c
fix: Show all available formats for archived I-Ds (#4298). Fixes #3881 2022-07-29 15:39:45 -05:00
Robert Sparks 23fc0ea44a
fix: add new search rule to correct group community lists (#4291) 2022-07-28 09:13:29 -05:00
Nicolas Giard 2c522ee169
fix: use white ietf text logo in header (#4283) 2022-07-27 15:43:06 -05:00
Nicolas Giard e0e663f964
fix: agenda - rename Video Stream tooltip to Full Client with Video (#4287) 2022-07-27 09:36:28 -05:00
Ryan Cross 2d48c84360
feat: Add tracking checked-in to MeetingRegistration and the registration API. (#4280)
* feat: add field MeetingRegistration.checkedin to track onsite checkin

* feat: add handling of ticket_type, checkedin to get_meeting_registation_data. Fixes #3672
2022-07-26 13:17:19 -05:00
Mark Donnelly 109c646450
fix: Update timezone on the interim create page (#4262)
* Fix: Update timezone on the interim create page

The interim creation screen will set the timezone to the timezone of
the browser.  Unfortunately, the UI element was never refreshed, so
it remained on its loaded default, thus telling the user the wrong
value.

This change adds a timezone widget refresh to the end of the function that
loads the browser's local timezone into the timezone value.

This change also adds code to update the 'Local timezone' help text
for the start time and end time input bozes to
call out the selected timezone specifically.

Fixes #3898

* Fix: Change var to const for code review
2022-07-26 12:16:14 -05:00
Valery Smyslov a5f27b0a5b
feat: show expired WG/RG drafts at WG/RG Documents page (#4252)
* Show expired WG/RG drafts.

* Update 0009_add_group_exp_rule_to_groups.py

fix dependency on migration file name

* Update forms.py

Simplify condition statements

* Update views.py

Fix - remove erroneous check (never happen)

* Added tests for expired WG drafts filtering rule
2022-07-26 12:02:09 -05:00
Justin Iurman b1aecf9525
fix: dates alignment in group/review_requests (#4268)
Remove "-date" from data-sort fields for all dates, so that all columns
are now much better aligned.

Note: did not find an opened issue related to this after a quick search.
2022-07-26 11:23:44 -05:00
Jennifer Richards 608b8e16a4
feat: only offer IAB/IESG members for bofreq responsible leadership (#4276)
* refactor: avoid using select2 data-* attrs on html elements

Using "data-ajax--url" shadows explicit configuration in our
select2.js wrapper. Use "data-select2-ajax-url" to avoid this.

Also add ability to omit the ajax setup entirely by returning
None from ajax_url().

* chore: hook up a flag to disable ajax for SearchablePersonsField

* refactor: send select2 prefetch data as array and allow config of min input length

* feat: only offer IAB/IESG members for bofreq responsible leadership

* test: area directors/IAB members should be options for bofreq responsible leaders

* test: update tests to match changes to SearchableField

* fix: clean up SearchablePersonsField breakage when searching by email address

* chore: finish incomplete comment
2022-07-26 11:23:00 -05:00
Lars Eggert 28b8ed0c84
fix: Allow searching for non-alphanumeric characters (#4266)
* fix: Allow searching for non-alphanumeric characters

Fixes #3675

@rjsparks, this avoids us needing to fork list.js. If you prefer a fork, let me
know.

* Add a TODO
2022-07-26 09:38:34 -05:00
Nicolas Giard aea533e4dd
fix: add missing slides + minutes tabs to session materials dialog #4274 (#4275)
* fix: handle session dropdown link on mobile view

* feat: agenda session materials API endpoint

* feat: agenda-neue - add slides + minutes tabs to session materials dialog

* fix: remove commented line leftover
2022-07-26 09:30:20 -05:00
Nicolas Giard 4e649b9e2c
fix: force open links in agenda session materials html to open in new tab (#4277) 2022-07-26 09:04:24 -05:00
Lars Eggert 236c3f5b3e
fix: Don't run striptags on event descriptions that are emailed (#4267)
* fix: Don't run `striptags` on event descriptions that are emailed

Remove the `textify` filter, which is now unused.

Fixes #3600

* Update ietf_filters.py

* Update notification_email.txt
2022-07-24 11:37:17 -05:00
Lars Eggert 3d49384213
fix: Make the "submit to IESG" workflow less surprising to @LPardue :-) (#4254)
* fix: Make the "submit to IESG" workflow less surprising to @LPardue :-)

Fixes #4209

* Merge part of #4256
2022-07-24 11:28:27 -05:00
Mark Donnelly e1907d0b4d
Fix: Add 'back' button instead of 'cancel' to session request page (#4249)
* Fix: Add 'back' button instead of 'cancel' to session request page

The 'Cancel' button that goes back to the same page was confusing, so change it out for a 'Back' button instead.

Fixes #4007

* Fix: Change absolute target for going back with history.back()

This form can be included from multiple pages, which have differing
navigation for how to land on the form.  Therefore, history.back()
is the single way to navigate back to the previous page.
2022-07-24 10:36:01 -05:00
Nicolas Giard a605b08de6
feat: load agenda asynchronously via REST endpoint (#4257)
* feat: load agenda asynchronously via REST endpoint

* fix: handle invalid meeting number + pre-64 meetings redirect
2022-07-24 10:34:57 -05:00
Jennifer Richards b4e5cfcf91
fix: link to jabber logs for old meetings (#4250)
* fix: link to jabber logs for old meetings

* test: validate the URL for old Session chat logs
2022-07-24 09:06:23 -05:00
Jim Fenton 3aab73d862
feat(nomcom): Allow nomcom chair to turn volunteer acceptance on and off (#4251)
* feat(nomcom): Allow nomcom chair to turn volunteer acceptance on and off
Fixes #4105
Also allows chair to set date of first call for volunteers. If this should be read-only and set by the code, let me know.

* fix(nomcom): Correct helptext for accepting volunteers
2022-07-24 08:51:57 -05:00
Peter Yee 3a1d8b398d
Fix: corrects the IESG evaluation record summary for approved docs (#4261)
* fix: corrects the IESG evaluation record summary statement for documents where the IESG state is approved (announced or not).

* fix: corrects IESG evaluation record summary for approved docs
This is a correction to a previous fix that didn't pass all the tests
for some documents

* fix: corrects IESG evaluation record summary for approved docs
Corrects the previous fix by removing commented out code. Sigh. At least
these are free.
2022-07-24 07:53:46 -05:00
Justin Iurman f58033e36f
fix: closed review request "by (System)" (#4255)
Only display the user in the "Requested" column if it's a real human
(i.e., not "System").

Fix #3687
2022-07-24 07:28:06 -05:00
Lars Eggert 98af0e8a58
fix: Make dropdowns toggle correctly on click/hover combo (#4265)
Fixes #4095
2022-07-24 07:13:12 -05:00
Robert Sparks de4f1feed2
fix: send status change eval and lc to IANA. Fixes #3504. (#4244) 2022-07-23 12:36:00 -05:00
Justin Iurman 57e729cdc3
fix: add mailtrigger links (#4243)
Replace text by link for a trigger when displayed.
Do the same for a recipient.

Fixes #3886
2022-07-23 12:07:33 -05:00
Lars Eggert e94614e0a8
feat: Add opengraph information to document pages (#4207)
* feat: Add opengraph information to document pages

* Apply suggestions from code review

Co-authored-by: Mark Nottingham <mnot@mnot.net>

* Add IRTF and IAB logo and make card PNGs for all

* Use the cards and restore stuff that somehow got dropped

* Try and make Twitter use the "large image" card format

Co-authored-by: Mark Nottingham <mnot@mnot.net>
2022-07-23 12:07:04 -05:00
Lars Eggert 1ba87890ba
feat: Render the document shepherd writeup templates at two new URLs (#4225)
* feat: Render the document shepherd writeup templates at two new URL.

Those being `/doc/shepherdwriteuptemplate/group` and
`/doc/shepherdwriteuptemplate/individual`.

* Address review comments from @jennifer-richards

* Fixes

* Remove debug statement

* Make bleach sanitizer not strip the `start` attribute of `ol` tags

Also rearrange the code a bit

* Don't sanitize the `python_markdown` output, it destroys wanted formatting

* Restore bleach

* Don't bleach tag `id`s.
2022-07-22 13:43:02 -05:00
Lars Eggert ce050fc508
chore: Update bootstrap to 5.2.0 (#4034)
* bootstrap -> 5.2.0

* Update other deps
2022-07-21 15:56:27 -05:00
Robert Sparks fe1f51aede
fix: Compute 8989 eligibility using actual attendance data. (#4236) 2022-07-21 12:58:32 -05:00
Lars Eggert e465f1f0f0
feat: Replace graphviz with d3 (#4067)
* feat: Use d3 for doc dependencies

* Interim commit

* Progress

* Progress

* Auto pan and zoom

* Arrows

* Remove graphviz and the code that uses it

* More graphviz-related changes

* Interim commit

* Move things into place

* Add test

* Final touches

* Make SVG work in Chrome

* Get the docs more similarly to how the group doc page does it

* Reindent

* Add ability to download the SVG, and use bs fonts.

* Follow @rjsparks' advice on how to compute the reference list

* Interim commit

* Add legend

* Speed up simulation

* Fix tooltips

* fix: escape a period in a new url regex

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-07-21 12:14:45 -05:00
Robert Sparks fcbd5e418f
fix: stabilize the order of related documents shown on status-change pages (#4237) 2022-07-21 11:19:52 -05:00
Robert Sparks add95d36eb
fix: correct json import error for 112 and 113 plenary sessions (#4234) 2022-07-21 11:19:26 -05:00
Lars Eggert 54a8188ab9
fix: Fix various page titles (#4239)
Fixes #4230
2022-07-21 11:11:31 -05:00
Robert Sparks ffe824b7cd
chore: improve ALLOWED_HOSTS in settings (ports are not useful there) (#4232) 2022-07-20 15:16:14 -05:00
Robert Sparks 99d4e16b30
feat: improve admin for Meeting Attended (#4233)
* feat: improve admin for Meeting Attended

* fix: further tweaks to the attended admin
2022-07-20 15:15:48 -05:00
Lars Eggert 0038151bf9
fix: Fix removetags (#4226)
I don't think this ever worked.
2022-07-18 09:39:11 -05:00