Commit graph

198 commits

Author SHA1 Message Date
Jennifer Richards c6389ba65f
fix: only send state change notifications once (#7953)
* feat: split state_change_event create / save

* refactor: avoid double-save in rfceditor.py

* feat: only send notifications on event creation

* test: update test_notification_signal_receiver()

* chore: update comment
2024-09-18 14:02:00 -05:00
Jennifer Richards 6f4e328334
fix: remove is_secure() check (#7579)
The real work happened in a previous commit,
just nudging the patch version with this CC
message.
2024-06-21 09:50:35 -05:00
Jennifer Richards c8471d47d3
chore: remove is_secure() check (#7575) 2024-06-21 09:33:00 -05:00
Jennifer Richards 46a00acefc
refactor: sync to RFC Editor queue via celery (#7415)
* feat: rfc_editor_queue_updates_task

* refactor: use rfc_editor_queue_updates_task()

* chore: remove now-unused scripts

* test: test new task

* chore: de-lint
2024-05-14 18:56:14 -05:00
Jennifer Richards 0616b07d2d
feat: email ingestion API (#7342)
* feat: IANA review email ingestor API

* refactor: Replace iana email api with generic one

* chore: Add type hint

* feat: Ingest ipr responses

* feat: Ingest nomcom feedback

* refactor: message -> msg

* fix: Typo

* feat: Send email on nomcom ingestion failure

* feat: Send email on IPR mail ingestion error

* feat: Check content type, handle more errs

* fix: drop additionalProperties: false

Unfortunately this does not mix well with
the conditional "year" property.

* test: Test ingest_email view

* Revert "test: Test ingest_email view"

This reverts commit e498022829f834a0d3cebcb0dafb0d5f5a5d162e.

* test: Test ingest_email view

* fix: pass new test

* test: Test ingest_review_email

* fix: Pass new test

* test: Test ipr ingest_response_email

* fix: pass new test

* test: test nomcom ingest_feedback_email

* chore: fix typo found in code reviw

* fix: De-lint
2024-04-23 09:07:50 -05:00
Jennifer Richards cf21b8f236
fix: Only POST to rfceditor in production (#7241)
* fix: Only POST to rfceditor in production

* test: Test server mode checking
2024-03-20 21:43:10 -05:00
Jennifer Richards b4cf04a09d
feat: celery tasks to replace ietf/bin scripts (#6971)
* refactor: Change import style for clarity

* feat: Add iana_changes_updates_task()

* chore: Squelch lint warning

My linter does not like variables defined outside
of __init__()

* feat: Add PeriodicTask for iana_changes_updates_task

* refactor: tasks instead of scripts on sync.views.notify()

* test: Test iana_changes_updates_task

* refactor: rename task for consistency

* feat: Add iana_protocols_update_task

* feat: Add PeriodicTask for iana protocols sync

* refactor: Use protocol sync task instead of script in view

* refactor: itertools.batched() not available until py312

* test: test iana_protocols_update_task

* feat: Add idindex_update_task()

Calls idindex generation functions and does the file
update dance to put them in place.

* chore: Add comments to bin/hourly

* fix: annotate types and fix bug

* feat: Create PeriodicTask for idindex_update_task

* refactor: Move helpers into a class

More testable this way

* refactor: Make TempFileManager a context mgr

* test: Test idindex_update_task

* test: Test TempFileManager

* fix: Fix bug in TestFileManager

yay testing

* feat: Add expire_ids_task()

* feat: Create PeriodicTask for expire_ids_task

* test: Test expire_ids_task

* test: Test request timeout in iana_protocols_update_task

* refactor: do not re-raise timeout exception

Not sure this is the right thing to do, but it's the
same as rfc_editor_index_update_task

* feat: Add notify_expirations_task

* feat: Add "weekly" celery beat crontab

* refactor: Reorder crontab fields

This matches the crontab file field order

* feat: Add PeriodicTask for notify_expirations

* test: Test notify_expirations_task

* test: Add annotation to satisfy mypy
2024-01-31 15:24:20 -06:00
Jennifer Richards 36c43c8520
chore: add task tests; move message task to message app (#6964)
* test: Test send_review_reminders_task

* refactor: Move send_scheduled_mail_task to message app

* chore: Remove unused import

* test: Add Message/SendQueue factories

* test: Test send_scheduled_mail_task

* test: Reset mocks before reuse

* test: Cover error conditions

* test: Return non-empty change set

* test: Test SMTPException handling

* test: Test fetch_attendance_from_meetings()

* test: Test RuntimeError handling

* test: RFC index sync should populate authors
2024-01-24 08:53:42 -06:00
Jennifer Richards 7dbb7e36d3
fix: Add testing, fix bug in fetch_meeting_attendance_task (#6961)
* test: Test rfc_editor_index_update_task

* chore: Add docstring to test

* fix: Reuse stats instead of fetching twice

* test: Test fetch_meeting_attendance_task

* chore: Remove outdated tasks

* Revert "chore: Add docstring to test"

This reverts commit 0395410d665c0d310248fd151386f013357c5d13.

* Revert "test: Test rfc_editor_index_update_task"

This reverts commit 4dd9dd131723497db3d2aa76166169fd32c42fdd.

* test: Test rfc_editor_index_update_task

This time without reformatting the entire file...

* chore: Remove accidentally committed fragment

* test: Annotate function to satisfy mypy

* chore: Remove unused imports
2024-01-23 16:14:37 -06:00
Jennifer Richards 97822214eb
fix: Set authors when publishing an RFC (#6957)
* fix: Copy authors from draft when RFC is published

* feat: Mgmt command to set RFC authors from draft

* feat: Better event messages
2024-01-23 09:04:13 -06:00
Jennifer Richards 8d12071bf5
refactor: Move cron jobs to celery tasks (#6926)
* refactor: Factor out helper from fetch_meeting_attendance.py

* feat: Define fetch_meeting_attendance_task task

Equivalent to the fetch_meeting_attendance management command

* chore: Disable fetch_meeting_attendance in bin/daily

* feat: Log errors in fetch_meeting_attendance_task

* feat: Enable a result backend for celery

Ignore results by default, but enable the backend so we
can manage tasks

* feat: Define daily task in ietf.utils.tasks

* refactor: Make bin/send-review-reminders into a task

* refactor: Make bin/send-scheduled-mail into a task

* chore: Update copyright years

* refactor: Make bin/rfc-editor-index-updates into a task

* refactor: Accept date type in rfc index update fn

* chore: Update comment

* fix: Annotate param as Optional

* fix: Revert treating skip_older_than_date as str

Misunderstood the comment, "fixed" a non-bug. Oops.

* feat: mgmt command to create periodic tasks

* feat: add summary of tasks to mgmt cmd

* style: black

* fix: Remove debug statements

* feat: Enable/disable tasks

* chore: Disable periodic tasks by default

* chore: Revert changes to daily and every15m

* fix: Call intended function

* chore: Add task descriptions
2024-01-22 12:04:16 -06:00
Jennifer Richards cbe710d3fd
fix: Migrate and handle subseries IprDocRels (#6745)
* chore: Stash orig IprDocRel document alias

* chore: Point IprDocRel at subseries docs

* fix: Fix IprDocRel.document usage in templates

* fix: Handle subseries in IprDocRel.formatted_name()

* refactor: Better presentation of IprDocRel subseries

* fix: Allow blank originaldocumentaliasname
2023-12-07 15:40:18 -04:00
Jennifer Richards 8351b4528f
test: RFC pub date is in RPC_TZINFO (#6747) 2023-12-07 11:57:24 -04:00
Jennifer Richards ab3864e07a
refactor: Minor clean up of rfc index sync (#6661)
* chore: Remove commented code

* refactor: Drop unneeded local variable

* refactor: Eliminate no-op code branch
2023-11-17 17:09:11 -04:00
Jennifer Richards 4ac1153d7d
fix: Label draft change log with rfc number (#6659)
* fix: Label draft change log with rfc num

* test: Update test
2023-11-17 15:49:34 -04:00
Robert Sparks 195926ada7
fix:bring rfc-index sync test into sync with function changes 2023-11-05 14:47:43 +01:00
Robert Sparks 1f82fab2cd
fix: silenced (and explained) several warnings 2023-11-01 15:20:29 -05:00
Robert Sparks 942c4d42af
fix: better message on first import of subseries membership 2023-11-01 13:29:12 -05:00
Robert Sparks e65c4c3f7f
fix: use clearer descriptions on docevents for initial sync run 2023-10-31 16:36:47 -05:00
Robert Sparks 0afe496aa3
fix: preserve RelatedDocument references to subseries 2023-10-31 15:52:11 -05:00
Robert Sparks 1b32fde588
fix: cleaner sync test (#6372) 2023-09-26 17:11:10 -05:00
Robert Sparks 8732dcb706
fix: bring tests up current. add subseries names to rfc view. fix html. 2023-09-22 12:40:15 -05:00
Robert Sparks 48cb06d20d
fix: subseries specific docevent types. get_or_create contain relationship. remove spurious " 2023-09-21 16:38:41 -05:00
Robert Sparks 0390f1868f
feat: subseries 2023-09-21 12:54:17 -05:00
Robert Sparks 96fae0c436
feat: remove DocAlias 2023-08-19 13:17:21 -05:00
Robert Sparks 5489fea9f7
fix: untangle stats and iana sync 2023-08-19 12:58:01 -05:00
Robert Sparks 3b067a468a
fix: name corrections, flake removal 2023-08-17 16:34:26 -05:00
Robert Sparks 7441413032
chore: merge in and adjust rfceditor.py changes 2023-08-17 16:03:17 -05:00
Robert Sparks 9b59717b39
Merge branch 'feat/rfc' into nomoredocalias 2023-08-17 15:55:49 -05:00
Jennifer Richards 4706ac2a37
fix: Restore old handling of draft-iesg state
Missing state -> idexists, idexists -> idexists, anything
else becomes pub.
2023-08-16 11:53:58 -03:00
Robert Sparks 383899c5c4
chore: checkpoint: docalias mostly removed 2023-08-15 16:49:17 -05:00
Jennifer Richards 80a361c3c8
test: Check that no logs are emitted in test_rfc_index 2023-08-14 14:27:26 -03:00
Jennifer Richards b565f104d8
test: Don't mix stream states in test_rfc_index()
Make the test a better simulation of actual practice.
2023-08-14 14:09:37 -03:00
Jennifer Richards cf470a4680
fix: Use correct stream slugs 2023-08-14 14:08:48 -03:00
Jennifer Richards 06adb25e43
fix: Set draft-iesg state to "pub" when a draft is published 2023-08-14 13:37:24 -03:00
Jennifer Richards 92460319d1
refactor: Refactor handling of draft stream states 2023-08-14 13:06:48 -03:00
Jennifer Richards f9ca1bc9d6
test: Test behavior of verified-errata tag
Also add comments flagging the near-miss between doc-id
and RFC number in the test_rfc_index() test data. It's
unclear whether these were intended to match, but the
test was self-consistent so I am not changing it.
2023-08-14 12:15:09 -03:00
Jennifer Richards aff4c2d0db
fix: Drop leading 0s from RFC doc-id 2023-08-11 12:04:15 -03:00
Jennifer Richards a66457bfaf
test: Remove python lint 2023-08-10 18:01:11 -03:00
Jennifer Richards 92ad44e70c
test: Test more fields on the rfc doc 2023-08-10 17:53:35 -03:00
Jennifer Richards ab99972d76
fix: Check state correctly 2023-08-10 17:44:37 -03:00
Jennifer Richards 8b636216d0
feat: describe change as "set" or "changed" as appropriate 2023-08-10 17:35:12 -03:00
Jennifer Richards 39ccea92f9
feat: Set published state on rfc doc 2023-08-10 17:01:06 -03:00
Jennifer Richards 7535df3eeb
feat: Set more fields on rfc doc 2023-08-10 17:00:08 -03:00
Jennifer Richards fd1d425db6
feat: Log warning if rfc index refers to unknown draft 2023-08-10 16:12:01 -03:00
Jennifer Richards e898e43bc8
fix: Only consider rfcs for updates/obsoletes targets 2023-08-10 16:09:53 -03:00
Jennifer Richards 112ac906dc
test: Confirm changes are returned for draft and rfc 2023-08-10 16:01:34 -03:00
Jennifer Richards 4437796bc3
test: Update test_rfc_index() 2023-08-10 15:43:10 -03:00
Jennifer Richards 542b87209d
chore: Eliminate python lint 2023-08-10 14:59:55 -03:00
Jennifer Richards eaf8d459ec
fix: Only match draft docs to rfc index draft name 2023-08-10 14:58:32 -03:00