Commit graph

692 commits

Author SHA1 Message Date
Jennifer Richards cb8ef96f36
fix: more submission date feedback; refactor xml2rfc log capture (#8621)
* feat: catch and report any <date> parsing error

* refactor: error handling in a more testable way

* fix: no bare `except`

* test: exception cases for test_parse_creation_date

* fix: explicitly reject non-numeric day/year

* test: suppress xml2rfc output in test

* refactor: context manager to capture xml2rfc output

* refactor: more capture_xml2rfc_output usage

* fix: capture_xml2rfc_output exception handling
2025-03-03 09:21:39 -06:00
Jennifer Richards fb310e5ce2
feat: useful error when submission has inconsistent date (#8576)
* chore: handle errors in app-configure-blobstore.py

* feat: sensible error for inconsistent <date>
2025-02-21 09:49:16 -06:00
Robert Sparks 997239a2ea
feat: write objects to blob storage (#8557)
* feat: basic blobstore infrastructure for dev

* refactor: (broken) attempt to put minio console behind nginx

* feat: initialize blobstore with boto3

* fix: abandon attempt to proxy minio. Use docker compose instead.

* feat: beginning of blob writes

* feat: storage utilities

* feat: test buckets

* chore: black

* chore: remove unused import

* chore: avoid f string when not needed

* fix: inform all settings files about blobstores

* fix: declare types for some settings

* ci: point to new target base

* ci: adjust test workflow

* fix: give the tests debug environment a blobstore

* fix: "better" name declarations

* ci: use devblobstore container

* chore: identify places to write to blobstorage

* chore: remove unreachable code

* feat: store materials

* feat: store statements

* feat: store status changes

* feat: store liaison attachments

* feat: store agendas provided with Interim session requests

* chore: capture TODOs

* feat: store polls and chatlogs

* chore: remove unneeded TODO

* feat: store drafts on submit and post

* fix: handle storage during doc expiration and resurrection

* fix: mirror an unlink

* chore: add/refine TODOs

* feat: store slide submissions

* fix: structure slide test correctly

* fix: correct sense of existence check

* feat: store some indexes

* feat: BlobShadowFileSystemStorage

* feat: shadow floorplans / host logos to the blob

* chore: remove unused import

* feat: strip path from blob shadow names

* feat: shadow photos / thumbs

* refactor: combine photo and photothumb blob kinds

The photos / thumbs were already dropped in the same
directory, so let's not add a distinction at this point.

* style: whitespace

* refactor: use kwargs consistently

* chore: migrations

* refactor: better deconstruct(); rebuild migrations

* fix: use new class in mack patch

* chore: add TODO

* feat: store group index documents

* chore: identify more TODO

* feat: store reviews

* fix: repair merge

* chore: remove unnecessary TODO

* feat: StoredObject metadata

* fix: deburr some debugging code

* fix: only set the deleted timestamp once

* chore: correct typo

* fix: get_or_create vs get and test

* fix: avoid the questionable is_seekable helper

* chore: capture future design consideration

* chore: blob store cfg for k8s

* chore: black

* chore: copyright

* ci: bucket name prefix option + run Black

Adds/uses DATATRACKER_BLOB_STORE_BUCKET_PREFIX option. Other changes
are just Black styling.

* ci: fix typo in bucket name expression

* chore: parameters in app-configure-blobstore

Allows use with other blob stores.

* ci: remove verify=False option

* fix: don't return value from __init__

* feat: option to log timing of S3Storage calls

* chore: units

* fix: deleted->null when storing a file

* style: Black

* feat: log as JSON; refactor to share code; handle exceptions

* ci: add ietf_log_blob_timing option for k8s

* test: --no-manage-blobstore option for running tests

* test: use blob store settings from env, if set

* test: actually set a couple more storage opts

* feat: offswitch (#8541)

* feat: offswitch

* fix: apply ENABLE_BLOBSTORAGE to BlobShadowFileSystemStorage behavior

* chore: log timing of blob reads

* chore: import Config from botocore.config

* chore(deps): import boto3-stubs / botocore

botocore is implicitly imported, but make it explicit
since we refer to it directly

* chore: drop type annotation that mypy loudly ignores

* refactor: add storage methods via mixin

Shares code between Document and DocHistory without
putting it in the base DocumentInfo class, which
lacks the name field. Also makes mypy happy.

* feat: add timeout / retry limit to boto client

* ci: let k8s config the timeouts via env

* chore: repair merge resolution typo

* chore: tweak settings imports

* chore: simplify k8s/settings_local.py imports

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2025-02-19 17:41:10 -06:00
Robert Sparks e71272fd2f
chore: mark a function unreachable (#8553) 2025-02-19 15:09:17 -06:00
Jennifer Richards 04952d58fa
fix: remove all staging files for submission (#8535) 2025-02-18 10:33:33 -06:00
Robert Sparks 1ffd205ef0
fix: rsync to the correct dest (#8421) 2025-01-14 08:48:55 -06:00
Robert Sparks 7d464fcc55
fix: keep the ftp dir in sync when the datatracker creates artifacts (#8401)
* chore: fix typo in log message

* fix: write new conflict reviews to the ftp directory

* fix: log exception description

* chore: avoid reusing a name for mypy

* fix: write non-meeting-related slides to ftp/slides

* fix: write status changes to ftp dir

* fix: copy draft yang modules to the ftp dir

the last commit above (see #8401) has no tests :(. There aren't tests of this yang scaffolding to add to. Adding a set of tests should be an independent larger effort.
2025-01-09 11:23:20 -06:00
Jennifer Richards 427045d456
chore: remove unused method (#8341)
* chore: remove unused method

* chore: adjust another comment
2024-12-17 13:09:44 -06:00
Greg Wood 64c5ef16bd
fix: clarify replace wording (#8244)
* Clarify "Replace" in I-D submission form

Update help text In the "Replacement Information" section of
the "Status" tab

* refactor: update node, eslint, neostandard + fix esm (#8083)

* chore: update dependencies

* fix: eslint + neostandard

* fix: add corepack prompt env var to init script

* docs: Update README.md

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>

* ci: update base image target version to 20241114T1703

* ci: fix tests.yml workflow

* fix: clarify "Replace" in I-D submission form #8205

update quote syntax issue on previous update help text In the "Replacement Information" section of the "Status" tab to fix #8059

* Revert "refactor: update node, eslint, neostandard + fix esm (#8083)"

This reverts commit 649879efd745470f6e0cc6768d889f45640e1505.

* Revert "ci: update base image target version to 20241114T1703"

This reverts commit f11144017ed788bc7a38a1d028127434f0d50eb4.

* Revert "ci: fix tests.yml workflow"

This reverts commit 39231321c49291565a39608b98740e098c74dda7.

* Update forms.py

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: NGPixel <NGPixel@users.noreply.github.com>
2024-12-05 08:50:07 -06:00
Jennifer Richards a35aa67c70
chore: clarify transaction-related comments (#8180) 2024-11-08 11:55:47 +00:00
Jennifer Richards c26ba974ba
refactor: use form for search_submission (#8065)
* refactor: use form for search_submission

* chore: remove lint

* style: Black
2024-10-22 10:51:16 -05:00
Jennifer Richards de2e66ede3
feat: report xml2rfc errors for submissions (#8000)
* feat: capture xml2rfc output on exception

* fix: chain exception properly

* feat: log xml2rfc stderr/stdout

May want to pass these back to the submitter, but
let's watch them to see what sorts of sanitizing we
should do first.

* Revert "feat: log xml2rfc stderr/stdout"

This reverts commit 959c54d30733a4a3df7ed0250fef347ed6f03a08.

* feat: log xml2rfc stderr/stdout

This time without reformatting all the imports

* feat: path sanitization for submission errors

* fix: parentheses in regex

* test: test SubmissionError sanitization

* style: consolidate imports

* fix: apply sanitization to all args

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-10-17 16:23:13 -05:00
Jennifer Richards 6aff818b72
feat: remove deprecated /api/submit/ endpoint (#8017)
* feat: remove deprecated /api/submit endpoint

* chore: remove unused imports

* test: test api_submit_tombstone view
2024-10-09 10:56:00 -05:00
Jennifer Richards 92784f9c31
feat: re-run yang checks via celery (#7558)
* refactor: yang checks -> task

* chore: add periodic task

* chore: remove run_yang_model_checks.py

* test: add tests

* refactor: populate_yang_model_dirs -> task

* chore: remove populate_yang_model_dirs.py

* chore: remove python setup from bin/daily
2024-06-18 10:42:13 -05:00
Jennifer Richards 08e953995a
feat: better reject null characters in forms (#7472)
* feat: subclass ModelMultipleChoiceField to reject nuls

* refactor: Use custom ModelMultipleChoiceField

* fix: handle value=None
2024-05-28 10:34:55 -05:00
Jennifer Richards 1a2996e5f6
feat: expire submissions after 14 days (#7461)
* feat: expire submissions after 14 days

* test: update test_cancel_stale_submissions
2024-05-24 09:30:01 -05:00
Jennifer Richards a1a30974ea
fix: compare ext with leading '.' (#7458)
This allows an exception to be raised if submission
files are missing, leading to a server error. That's
not pretty, but is better than ignoring the fail.
2024-05-24 09:29:42 -05:00
Jennifer Richards a4e0354090
feat: get tool versions without VersionInfo model (#7418)
* feat: get tool versions without VersionInfo model

* chore: remove update_external_command_info call

* feat: get tool version without VersionInfo

* chore: Remove VersionInfo model

* chore: Migration to remove VersionInfo

* fix: handle errors better; ignore stderr

* fix: type annotation
2024-05-14 18:53:31 -05:00
Robert Sparks cedd58f950
feat: obviate ghostlinkd (#7336)
* wip: identify whats needed to obviate ghostlinkd

* fix: hardlink new charter files to ftp directory

* fix: hardlink new charter files to ftp directory (continued)

* chore: bring settings comment up to date

* chore: add archive and ftp dirs to setup of various environments

* fix: test charter submits write to ftp dir

* chore: remove debug

* fix: test charter approval writes to ftp dir

* fix: link review revisions into ftp dir

* fix: link to all archive and ftp on submission post

* chore: clean comments, move action to github issue

* fix: link idindex files to all archive and ftp

* chore: deflake

* chore: remove TODO comment

* fix: use settings

* chore: rename new setting
2024-04-19 16:18:52 -05:00
Robert Sparks a00dfc0c27
chore: remove unused submit by email functionality (#7249) 2024-03-26 09:44:49 -05:00
Jennifer Richards 3afd6ca42f
fix: Avoid validation crash when title parsing fails (#7131)
* fix: Add guards after failed submission validation

* fix: Avoid nulling submission.title
2024-03-05 09:14:44 -06:00
Jennifer Richards fb84f3240e
test: Tweak test to avoid Leap Day failure (#7119)
* test: Tweak test to avoid Leap Day failure

🎉

* chore: Rephrase comment

* chore: Remove debug code
2024-02-29 12:01:46 -06:00
Robert Sparks 03e161bae9
chore: merge branch 'main' into feat/rfc 2023-12-05 09:12:11 -06:00
Paul Selkirk 5006ea53e6
fix: Reject obvious bad encoding pastes into the Submitter field in submissions (#6702) 2023-12-04 13:10:36 -06:00
Robert Sparks 28c3e1bd5d
chore: merge branch 'main' into feat/rfc 2023-11-01 10:54:29 -05:00
Jennifer Richards dc14308700
refactor: Drop submission validation via libmagic (#6500)
* refactor: Update parsers/base.py for Python3

* style: Black

* refactor: Remove mime type check from FileParser

* refactor: Validate that submission is UTF-8

The mime check distinguished us-ascii from UTF-8,
but as far as I can tell the code relying on it
treated both as equally valid.

* feat: Clear error when file is not valid XML

* chore: Remove unused import

* test: Update tests to match changes

* fix: Count bytes starting from 1

* test: Add tests of FileParser validations

* fix: Fix / simplify regexp

* test: Test error caused by bad XML submission

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-10-23 10:00:04 -05:00
Robert Sparks ab931f0510
chore: merge main into feat/rfc 2023-10-12 15:11:02 -05:00
Lars Eggert 7dbfc0208a
feat: Remove document notes from the datatracker (#6387)
* Remove doc.note

* Address comments from @rjsparks

* Consistently display doc notes
2023-10-09 12:15:18 -05:00
Robert Sparks e0f27b9d52
ci: merge branch 'main' into feat/rfc 2023-09-05 12:02:07 -05:00
Robert Sparks c8c1ebdf12
chore: remove unnecessary .gitignore files (#6262) 2023-08-31 17:12:01 -05:00
Robert Sparks f9c9644263
chore: merge main and fix conflicts 2023-08-30 16:35:20 -05:00
Jennifer Richards 7f8cbaa211
feat: Distinguish failed from not-applied checkers (#6220)
* feat: Distinguish failed from not-applied checkers

* refactor: Only return applied checks from latest_checks()

* refactor: Use latest_checks() in submission_status view

* chore: Fix incorrectly phrased comment

* test: Test submission check summary
2023-08-28 11:06:35 -05:00
Jennifer Richards 6adead355d
fix: Improve status page for canceled submissions (#6221)
* fix: Show quieter alert for metadata error in canceled submission

* fix: Suppress metadata errors and show warning for canceled submissions

* style: Fix indentation in HTML

* fix: Give better notice of a processing error
2023-08-26 15:58:40 -05:00
Jennifer Richards c65cd20f0c
fix: Move submission files using shutil.move() (#6217)
* fix: Use shutil.move in move_files_to_repository()

* refactor: Use shutil.move in rename_submission_files()
2023-08-25 11:47:28 -05:00
Robert Sparks 383899c5c4
chore: checkpoint: docalias mostly removed 2023-08-15 16:49:17 -05:00
Jennifer Richards 48d4072eeb
Merge branch 'feat/rfc' into main-merge
# Conflicts:
#	ietf/doc/factories.py
#	ietf/doc/tests_status_change.py
#	ietf/name/fixtures/names.json
#	ietf/templates/doc/document_info.html
2023-08-03 18:34:06 -03:00
Liubov Kurafeeva 91297f18e6
fix: Provide human-friendly status in submission status API response (#6011)
Co-authored-by: nectostr <bastinda96@gmail.com>
2023-07-22 12:43:08 -07:00
Robert Sparks 51c22d8e6c
fix: repairs reflecting removal of DocAlias from the RelatedDocument models 2023-07-20 13:03:58 -05:00
Robert Sparks c8684f727a
Merge branch 'main' into related_no_alias 2023-07-20 09:31:52 -05:00
Robert Sparks 81734443a5
fix: continued repair of code/tests re: RelatedDocument model change 2023-07-20 09:25:14 -05:00
Robert Sparks 59c0a1f7f9
chore: repair merge damage 2023-07-19 18:09:23 -05:00
Robert Sparks cf3a270cd2
Merge branch 'feat/rfc' into related_no_alias 2023-07-19 17:48:22 -05:00
Robert Sparks 3fe1fcf122
fix: send the whole txt submission to te DraftParser (#5956) 2023-07-12 08:58:08 -05:00
Robert Sparks 6305555480
chore: address pyflake issues 2023-07-10 14:41:45 -05:00
Robert Sparks bbef89140e
fix: removed notion of submitting RFCs from find_submission_filenames 2023-07-07 15:41:38 -05:00
Robert Sparks 457b95094a
fix: improvements to submit form validation 2023-07-07 15:08:41 -05:00
Robert Sparks db670dadc5
chore: continued refactor 2023-06-30 17:27:27 -05:00
Robert Sparks 8ff14419c2
chore: continued refactoring 2023-06-16 16:59:20 -05:00
Robert Sparks 4a062f5250
Merge pull request #5757 from ietf-tools/release
ci: merge release commit and patch back into main
2023-06-05 08:14:03 -05:00
Jennifer Richards d33a6f3c0c
fix: Handle missing date fields in XML submissions (#5744)
* refactor: Eliminate _construct_creation_date helper

* fix: Use xml2rfc method for filling in missing date fields

* fix: Set options.date for xml2rfc writers

* test: Test handling of missing date element/fields
2023-06-02 14:40:52 -05:00