Commit graph

1571 commits

Author SHA1 Message Date
Jennifer Richards 32054111df
fix: fix failing tests and eliminate naive datetime warnings (#4402)
* test: fix timestamp construction in several doc tests

* refactor: rename date2datetime to datetime_from_date and clarify code

* chore: helper to get tzinfo for PRODUCTION_TIMEZONE

* fix: fix timezone handling in make_last_call()

* test: fix datetime generation in doc.tests_charter

* refactor: remove PRODUCTION_TIMEZONE setting

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.

* test: be more careful about timezone in tests_charter.py

* test: be more careful about timezone in doc/tests.py

* fix: fix timezone handling affecting doc.tests_draft

* fix: fix timezone handling affecting tests_irsg_ballot.py

* fix: fix timezone handling affecting tests_review.py

* fix: fix timezone handling affecting last ietf.doc tests

* fix: fix timezone handling affecting last ietf.group tests

* fix: fix timezone handling affecting ietf.iesg tests

* fix: handle timezones in get_8989_eligibility_querysets

* fix: handle timezones affecting ietfauth tests

* fix: return tz-aware datetime from utc_from_string

* fix: specify timezone for constants in ipr_rfc_number()

* fix: specify tz for ipr deadlines

* fix: handle timezones affecting liaisons tests

* fix: treat leap day in get_8989_eligibility_querysets()

Manual cherry-pick of 248d6474

* test: treat leap day properly in nomcom tests

* fix: fix timezone handling affecting nomcom tests

* test: fix timezone handling in review tests

* fix: fix timezone handling affecting secr.meetings tests

* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone

* fix: fix timezone handling affecting secr.proceedings tests

* refactor: use make_aware() helper in secr.meetings tests

* test: fix timezone handling in secr.telechat tests

* fix: fix timezone handling affecting stats tests

* fix: eliminate tz-naive helpers affecting sync email parsing

* fix: include timezone data when serializing DeletedEvent data

* fix: fix timezone handling affecting sync tests

* style: remove unused import
2022-09-01 13:07:28 -03:00
Jennifer Richards c2c17cfeb1
chore: enforce USE_TZ setting expectations in migrations (#4386)
* chore: enforce USE_TZ setting expectations in migrations

* chore: keep USE_TZ=False until changed manually
2022-08-30 12:10:59 -03:00
Jennifer Richards 8b52d27b02
refactor: refactor timestamp handling so tests in meeting app pass (#4371)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: add migration to change timestamps to UTC

* refactor: move tz instantiation/caching from TimeSlot to Meeting

* fix: assume utc if meeting.time_zone is blank

* chore: make datetime.combine() calls tz aware in the meeting app

* ci: correctly use meeting.tz in TimeSlotFactory

* chore: compute TimeSlot utc / local times assuming tz-aware times

* chore: use tzaware math for agenda editor timeslot layout

* chore: fill in Meeting.time_zone where it is blank

Nearly all interim meetings on or before 2016-07-01 have blank
time_zone values. This migration fills these in with PST8PDT.

* chore: disallow blank Meeting.time_zone value

* refactor: no need to handle blank time_zone case in TZ migration

* refactor: remove now-unnecessary checks that meeting has time_zone

* chore: fix timezone handling in agenda.ics and Meeting.updated()

* chore: fix tz handling in interim_request_details, exercise in tests

* chore: fix timezone handling for test_interim_send_announcement

* chore: fix timezone handling in agenda_json()

* chore: fix timezone handling in old agenda

* chore: fix timezone handling for EditTimeslotsTests

* refactor: refactor a few fixes for more consistent timezone handling

* chore: add timezone info to timestamps in fixtures

* chore: remove naive datetime warnings found in meetings.tests_views

* chore: fix a few more test failures in meetings.tests_views

All tests in meetings.tests_views now passing

* chore: remove unused import

* chore: fix timezone handling in test_schedule_generator.py

* chore: fix timezone handling affecting meeting.tests_js

* chore: fix timeslot test bug when local date != UTC date

* test: fix a few failing tests, all meetings tests now pass

(for me, anyway)

* chore: renumber migrations

* chore: update timestamp conversion migration

The django-celery-beat package introduces tables with timestamp
columns. These columns are stored in CELERY_TIMEZONE. Because we run with
this set to UTC, the migration ignores these columns.

* chore: fix pytz-related change in migration

* chore: remove duplicate migrations

* chore: remove CELERY_BEAT_TZ_AWARE setting now that USE_TZ is True

* test: avoid failure in test with bogus timezone
2022-08-26 16:53:19 -03:00
Robert Sparks bd6d19efff
fix: replum settings so that production app configuration can be configured in settings_local (#4361) 2022-08-24 12:22:47 -05:00
Jennifer Richards e319a909b3
chore: suppress deprecation warning for urllib3[secure] extra (#4352) 2022-08-22 13:30:15 -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
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 de4f1feed2
fix: send status change eval and lc to IANA. Fixes #3504. (#4244) 2022-07-23 12:36:00 -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 ffe824b7cd
chore: improve ALLOWED_HOSTS in settings (ports are not useful there) (#4232) 2022-07-20 15:16:14 -05:00
Robert Sparks 6ed4ea0f93
feat: point to Zulip chat rather than jabber. (#4218)
* feat: point to Zulip chat rather than jabber.

* fix: Address review comments from Jennifer and Nick
2022-07-15 13:48:54 -05:00
Nicolas Giard 744bcc54e8
fix: set vite base path during deploy build + allow google fonts (#4217)
* fix: set vite base path during deploy build + allow google fonts

* ci: only set vite base path if build is for production release

* test: add html-validate ignore rules for vite generated content that is valid

* fix: show buttons on regular sessions without agenda materials + link to legacy agenda

* fix: temporarily hide left menu on agenda-neue and floor-plan-neue

* fix: set resize handler to whole app

* fix: apply html-validate ignore to agenda-neue only + deploy/build.sh fix

* test: change old agenda cypress to always take the same elements to avoid #3564
2022-07-14 18:55:55 -05:00
Nicolas Giard aa9490faf6
feat(ui): new dynamic agenda view (#4086)
* feat: agenda page in vue (wip)

* feat: scroll to agenda day

* fix: vue 3 composition api + eslint settings

* fix: agenda day scroll match indicator

* fix: convert vite deps to yarn

* fix: missing lodash + legacy build step

* fix: agenda - move calendar into drawer

* fix: improve agenda filter UI

* fix: download ics + move agenda into own component

* feat: use fullcalendar for agenda calendar view (wip)

* feat: add events to agenda calendar

* feat: agenda filter UI improvements

* feat: agenda add to calendar dropdown

* feat: agenda calendar filter + timezone + event coloring

* feat: agenda calendar color improvements

* chore: exclude dist-neue from git

* feat: agenda calendar event modal

* fix: rebuild yarn deps

* chore: add run migration task to vscode

* fix: agenda buttons display flag

* feat: agenda event modal component

* feat: show calendar event quick info on hover

* fix: clear calendar quick info on timezone change

* feat: agenda list view improvements

* feat: agenda list row coloring

* feat: agenda list note

* feat: agenda list icons for office hours + hackathon

* fix: agenda top links

* refactor: use pinia as store for agenda components

* feat: agenda jump to now

* fix: agenda mobile improvements

* feat: agenda search

* feat: agenda search improvements

* feat: agenda event recordings buttons for post-meeting

* fix: agenda switch to meeting timezone on load

* feat: agenda pre & live session buttons

* fix: remove agenda utc + personalize links in top menu

* feat: add pre-vue loading state on page load

* feat: filter from agenda picker mode

* fix: agenda UI improvements

* fix: django-vite non-dev mode

* chore: update yarn dependencies for vue + vite

* feat: agenda settings panel + UI improvements

* feat: agenda settings colors + import/export feature

* feat: agenda color assignments + responsive UI improvements

* feat: agenda realtime red line + debug datetime offset

* feat: agenda add aria labels for settings

* feat: add new agenda path + pages/menu

* fix: bring base/menu.html up to main

* fix: agenda various fixes

* test: add new agenda item to meetings menu for item count

* chore: restore devcontainer extensions list

* fix: agenda UI improvements + montserrat default font

* feat: agenda bolder text + hide event icons options

* feat: agenda warning badge

* fix: agenda various UI improvements + intersectionObserver fix

* feat: agenda floorplan page + various UI improvements

* feat: agenda floor plan pin

* feat: view floor plan room from agenda

* feat: agenda floor plan mobile optimization

* feat: adjust calendar options + default calendar view in settings

* feat: agenda persist picked events + change base font only on new agenda page

* feat: agenda mobile view optimizations

* fix: add .vite to cached volumes

* fix: mobile view for filters, calendar, settings panels

* test: upgrade cypress existing tests to work on bs5 + update dependencies

* fix: use named url patterns to avoid hardcoded URLs. Add rudimentary test coverage for the neue views.

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-07-13 16:20:23 -05:00
Robert Sparks aa8e4e6e5e
feat: use author-tools for idnits. (#4135) 2022-06-29 09:49:10 -05:00
Robert Sparks 10396d6f01
chore: remove more tools.ietf.org server only related things. (#4103)
* chore: remove more tools.ietf.org server only related things.

* chore: remove use of tools.ietf.org floorplans\n\nThe data will move into the FloorPlan models instead.
2022-06-22 14:11:46 -05:00
Lars Eggert c09fd9dad2
chore: Use URL resolver in more places (#4104)
* chore: Use URL resolver more

* Use settings.IDTRACKER_BASE_URL

* More fixes

* Use URL resolver for things under /accounts

* Use URL resolver for things under /stream

* Use URL resolver for things under /iesg

* Use URL resolver for things under /meeting

* Fix bugs

* Use URL resolver for things under /help

* Use URL resolver for things under /ipr

* More changes

* Revert vnu.jar

* Fix typos

* Address review comments by @rjsparks

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-06-22 14:10:16 -05:00
Robert Sparks 1b95fdf58a
revert: use author-tools for idnits. (#4102) (#4116)
This reverts commit caf2227813.
2022-06-22 12:21:52 -05:00
Robert Sparks caf2227813
feat: use author-tools for idnits. (#4102) 2022-06-20 17:38:40 -05:00
Robert Sparks 47b89c1112
chore: alter CSP to enable analytics (#3941) 2022-05-09 13:38:50 -05:00
Robert Sparks 86923dfe96
chore: update dependency requirements (#3904)
* chore: cleanup requirements.txt. Unpin factory-boy, ignoring resulting mypy complaints.

* chore: remove the upper limit as many dependencies as possible

* chore: remove unintended bookmark

* chore: normalize spaces before comments

* chore: improve comment explaining pinned Tastypie

* chore: shift dependencies minimum version requirements forward
2022-04-28 11:06:17 -05:00
Robert Sparks f4b0b459cb
feat: add analytics infrastructure (#3862) 2022-04-21 18:06:14 -05:00
Nicolas Giard b65182150f
chore: remove legacy / deprecated files (#3781)
* chore: remove changelog files

* chore: remove data dir from source

* chore: exclude /data completely in gitignore
2022-04-05 15:45:01 -04:00
Nicolas Giard cb3177efb9
chore: remove .gz from coverage file path in settings 2022-04-04 16:31:28 -04:00
Russ Housley 0024cc9ea1
chore: Remove references to settings.SECR_VIRTUAL_MEETINGS. Fixes #3717. (#3741) 2022-03-25 04:26:50 -05:00
Nicolas Giard 9a4505dc74
chore: remove svn/trac infrastructure (#3649) (#3739)
* chore: Remove svn/trac related infrastructure

* chore: Remove more svn/trac infrastructure

* fix: remove commented out Trac requirement
2022-03-24 12:24:35 -05:00
Lars Eggert 5125bb16ef
fix: X-Frame-Options can only be DENY or SAMEORIGIN these days (#3634) 2022-03-14 13:42:20 -03:00
Jennifer Richards 686a9150b3 Merge remote-tracking branch 'origin/main' into personal/jennifer/7.45.1.dev0.bootstrap-merge
# Conflicts:
#	ietf/templates/meeting/session_buttons_include.html
2022-03-04 15:14:52 -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 e3aa43eea5 Merged in [19967] from rjsparks@nostrum.com:
From Kesara Rathnayake: Expire password reset links on use, password change through other mechanics, login, or a short configurable time (initially one hour). Patched in at 7.45.0.p2.
 - Legacy-Id: 19968
Note: SVN reference [19967] has been migrated to Git commit 682392081bddbd1b8653df9135388e6b7c48ee1c
2022-02-23 18:30:27 +00:00
Jennifer Richards 6c260a5b7e Merge 7.45.1.dev0 into Bootstrap 5 update branch. Made a first pass at reconciling differences.
- Legacy-Id: 19945
2022-02-17 20:09:49 +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 f8c7be6df9 Merged in [19917] and [19930] from jennifer@painless-security.com:
Create/delete Meetecho conferences when requesting/canceling interim sessions. Fixes #3507. Fixes #3508.
 - Legacy-Id: 19934
Note: SVN reference [19917] has been migrated to Git commit 81cd64da2bc0122f733df02f7db634665c9b309a

Note: SVN reference [19930] has been migrated to Git commit c64297e495010f3c147726ad61c24ca436c324da
2022-02-14 19:08:10 +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
Lars Eggert 9c05373699 More fixes.
- Legacy-Id: 19856
2022-01-18 20:04:55 +00:00
Jennifer Richards 6f3fb6930f Add timeouts to requests library calls. Fixes #3498. Commit ready for merge.
- Legacy-Id: 19839
2022-01-13 15:06:28 +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 7d4ea4e37a Correct the url for the bibtex button. Provide a pdfized button. Fixes #3501. Commit ready for merge.
- Legacy-Id: 19806
2022-01-05 21:05:36 +00:00
Lars Eggert 5132661b06 More test fixes
- Legacy-Id: 19803
2022-01-05 11:25:25 +00:00
Robert Sparks 865dc62676 Change strategy to only creating a single file per doc/rev, and not creating the 'draft-'-less or version-less variants. Corrected calculation of date in the management command.
- Legacy-Id: 19789
2021-12-16 22:33:47 +00:00
Robert Sparks b7eec8ae26 Build and maintain a full set of bibxml-ids documents.
- Legacy-Id: 19782
2021-12-14 20:56:26 +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 9b54c9d3c9 Merged in [19763] from jennifer@painless-security.com:
Add ability to import session minutes from notes.ietf.org. Mock out calls to the requests library in tests. Call markdown library through a util method. Fixes #3489.
 - Legacy-Id: 19767
Note: SVN reference [19763] has been migrated to Git commit fd0df6f619
2021-12-09 22:43:19 +00:00
Jennifer Richards fd0df6f619 Add ability to import session minutes from notes.ietf.org. Mock out calls to the requests library in tests. Call markdown library through a util method. Fixes #3489. Commit ready for merge.
- Legacy-Id: 19763
2021-12-09 17:16:19 +00:00