Commit graph

225 commits

Author SHA1 Message Date
Nicolas Giard d98dc6fb10
ci: remove duplicate pg client tools from app image 2023-02-07 17:34:38 -05:00
Nicolas Giard 6513b4dbb1
ci: add pg client tools to base image 2023-02-07 17:33:45 -05:00
Nicolas Giard 9e340cd0e4
ci: add pg client to base app image 2023-02-07 17:00:54 -05:00
Robert Sparks e257ddbfea
fix: restore sql_debug functionality from the container (#4835) 2022-12-06 08:48:23 -06:00
Robert Sparks 562d5cceeb
fix: include html when syncing extra assets 2022-12-02 16:28:08 -06:00
Robert Sparks 2636c59f99
feat: stop supporting pre-tzaware migration database dumps. (#4782)
* feat: stop supporting pre-tzaware migration database dumps.

* chore: remove unnecessary env variable
2022-11-28 10:17:22 -06:00
Robert Sparks eb4b523e66
chore: merge main (#4714) 2022-11-06 12:36:14 -06:00
Ian Williams d7f5c20a28
doc: Add incompat note (#4694)
Plugin is incompatible w/ Snap install of VSCode, add note.
2022-11-06 12:22:57 +00:00
Jennifer Richards f3bdbf0ed4
Merge branch 'feat/tzaware' into jennifer/main-for-tzaware-merge
# Conflicts:
#	ietf/meeting/tests_js.py
#	ietf/meeting/tests_models.py
#	ietf/meeting/tests_views.py
#	ietf/meeting/views.py
#	ietf/name/fixtures/names.json
#	ietf/templates/meeting/agenda.html
#	ietf/templates/meeting/session_buttons_include.html
#	ietf/templates/meeting/timeslot_start_end.html
2022-10-14 16:35:57 -03:00
Nicolas Giard cbf34316f1
docs: update docker README 2022-10-13 17:22:01 -04:00
Jennifer Richards 1366b6de38
Merge branch 'feat/tzaware' into jennifer/main-to-tzaware-conflicts 2022-09-14 12:36:33 -03:00
Lars Eggert 743484fb4c
fix: Suppress useradd/groupadd errors (#4408) 2022-09-06 12:04:30 -05:00
Robert Sparks 4bcf896fef
fix: manage initial container migration more carefully. (#4396) 2022-08-31 16:22:24 -03:00
Robert Sparks f7f0ca99d3
fix: don't migrate dumpinfo. automate migrations and setting USE_TZ. (#4389)
* fix: don't migrate dumpinfo - it's already in UTC.

* chore: leave mode bits alone

* fix: migrate the container db, automating setting USE_TZ.
2022-08-31 12:38:48 -03:00
Nicolas Giard 41ae0cfac1
ci: update baseline coverage on build + new file URL (#4365) 2022-08-25 09:58:16 -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 35106c10a4
ci: fix db import file permission 2022-07-28 17:38:56 -04:00
Nicolas Giard 52b51e4962
ci: fix db container 2022-07-28 17:35:26 -04:00
Nicolas Giard 8ea4ad4de2
ci: fix mariadb service start command in db container 2022-07-28 16:56:23 -04:00
Nicolas Giard c8ce8cab90
ci: remove mariadb service stop from import stage in db container 2022-07-28 16:52:25 -04:00
Nicolas Giard aa4af6d9e5
ci: use ubuntu:focal for db build 2022-07-28 14:54:48 -04:00
Nicolas Giard ecd0edb0e2
ci: fix nightly db workflow to use ubuntu jammy 2022-07-26 17:39:58 -04:00
Nicolas Giard 9e55ec1fd4
chore: improve devcontainer build (#4241) 2022-07-23 10:33:41 -04:00
Nicolas Giard 4b50cfb912
docs: update DOCKER readme 2022-07-23 09:39:20 -04: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
Nicolas Giard 8bdbf7cb9a
chore: disable git info in zsh prompt in dev environment 2022-07-20 20:35:11 -04:00
Nicolas Giard dde5ed4650
chore: create separate run config for vite dev (#4221) 2022-07-18 08:40:32 -05:00
Robert Sparks 10e251fab8
Update README.md 2022-07-15 12:51:42 -05:00
Nicolas Giard 14527b0ec2
docs: update dev docker instructions for generic editors 2022-07-15 13:46:58 -04:00
Lars Eggert 9b1669c93d
fix: Expose port 3000 to host (for yarn dev) (#4215) 2022-07-15 12:39:40 -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
Lars Eggert 21c89e6dcc
chore: stop rsyncing old proceedings (#4099)
* chore: stop rsyncing old proceedings

* Even fewer things
2022-06-20 09:41:13 -05:00
Lars Eggert 8c769521f0
fix: rsync fewer files (#4089)
It's still super slow, however.
2022-06-16 11:45:04 -05:00
Nicolas Giard ef21caf7bf
chore: remove full.Dockerfile poc 2022-06-15 16:02:47 -04:00
Nicolas Giard 083732557d
fix: skip assets volume in cleandb script + add confirm prompt to cleanall (#4038)
* fix: skip assets volume in cleandb script + add confirm prompt to cleanall

* fix: remove purge dangling images from cleanall script
2022-06-13 12:13:16 -05:00
Nicolas Giard 25c7c4801a
chore: fix rsync-extras script options + add quiet mode 2022-06-04 18:37:45 -04:00
Nicolas Giard d825a59e67
ci: build app image with full assets 2022-06-04 17:59:31 -04:00
Nicolas Giard 5d5fc75958
chore: fix missing devcontainer dependencies (#4024) 2022-05-31 16:47:06 -05:00
Nicolas Giard e02ce05612
chore: make /assets a named volume for dev container (#4018)
* chore: make /assets a static volume for dev container

* chore: fix create-dirs script to point to /assets
2022-05-31 16:43:29 -05:00
Nicolas Giard 4457263599
ci: remove watchman to resolve invalid clockspec error 2022-05-24 20:51:50 -04:00
Nicolas Giard f02a7e1797
chore: fix /dev/shm permissions on docker init script 2022-05-24 19:52:32 -04:00
Nicolas Giard 742ce5a08e
chore: make dev container use base image 2022-05-24 16:49:37 -04:00
Lars Eggert 53c1377717
ci: Add watchman to image (#4014)
This speeds up repeated runs of `parcel`, but unfortunately not the initial one.
2022-05-24 15:42:20 -05:00
Nicolas Giard 8e0ff71709
ci: remove pip install from base docker image 2022-05-24 16:17:08 -04:00
Nicolas Giard a7d080b4df
ci: build app base docker image 2022-05-24 15:50:01 -04:00
Nicolas Giard 9316429e0e
chore: remove workspace chown from dev init script + add warning when using root 2022-05-21 00:18:24 -04:00
Nicolas Giard b6186f1fab
chore(dev): fix uid/gid mapping for non-vscode devs (#3981)
* chore: fix uid/gid mapping for non-vscode devs

* chore: fix volume ownership in devcontainer

* chore: use zsh in init script + remove temp mounted folders

* chore: ignore group mapping error during devcontainer build

* chore: fix ownership when running as root on host

* chore: use new docker compose command format + fix root check

* chore: improve uid/gid mapping message output

* chore: include chromedriver permission fix

* chore: skip parent dev image and install node directly instead of nvm

* chore: reapply gitignore changes + better dev help message
2022-05-20 09:10:41 -05:00
Nicolas Giard 8a7f67d4d1
test: make tests run without root access (#3968) 2022-05-14 08:11:44 -05:00
Nicolas Giard f1472ffcac
chore: run devcontainer as user vscode instead of root (#3948) 2022-05-13 14:13:50 -05:00
Lars Eggert 5598762608
fix: add more HTML validation & fixes (#3891)
* Update vnu.jar

* Fix py2 -> py3 issue

* Run pyupgrade

* test: Add default-jdk to images

* test: Add option to also validate HTML with vnu.jar

Since it's already installed in bin. Don't do this by default, since it
increases the time needed for tests by ~50%.

* fix: Stop the urlizer from urlizing in linkified mailto: text

* More HTML fixes

* More HTML validation fixes

* And more HTML fixes

* Fix floating badge

* Ignore unicode errors

* Only URLize docs that are existing

* Final fixes

* Don't URLize everything during test-crawl

* Feed HTML into vnu using python rather than Java to speed things up

* Allow test-crawl to start vnu on a different port

* Increase retry count to vnu. Restore batch size to 30.

* More HTML validation fixes

* Use urllib3 to make requests to vnu, since overriding requests_mock is tricky

* Undo commit of unmodified file

* Also urlize ftp links

* Fix matching of file name

* More HTML fixes

* Add `is_valid_url` filter

* weekday -> data-weekday

* urlencode URLs

* Add and use vnu_fmt_message. Bump vnu max buffer.

* Simplify doc_exists

* Don't add tab link to mail archive if the URL is invalid

* Run urlize_ietf_docs before linkify

Reduces the possibility of generating incorrect HTML

* Undo superfluous change

* Runner fixes

* Consolidate vnu message filtering into vnu_filter_message

* Correctly handle multiple persons with same name

* Minimze diff

* Fix HTML nits

* Print source snippet in vnu_fmt_message

* Only escape if there is something to escape

* Fix snippet

* Skip crufty old IPR declarations

* Only include modal when needed. Add handles.

* Fix wordwrap+linkification

* Update ietf/doc/templatetags/ietf_filters.py

* Update ietf/doc/templatetags/tests_ietf_filters.py

* Don't right-align second column
2022-05-03 13:55:48 -05:00