Commit graph

289 commits

Author SHA1 Message Date
Robert Sparks 554182ef8a
feat: run the docker container as dev (#8606)
* feat: run the docker container as dev

* fix: $@ -> $*

Old bug, but might as well fix it now

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2025-03-04 11:42:04 -06:00
Jennifer Richards 232a861f8a
chore: config gunicorn secure_scheme_headers (#8632)
* chore: config gunicorn secure_scheme_headers

* chore: typo in comment
2025-03-03 12:51:14 -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
dependabot[bot] 373623da42
chore(deps): bump the /dev/diff npm dependencies (#8439)
Bumps the npm group with 3 updates in the /dev/diff directory: [chalk](https://github.com/chalk/chalk), [dockerode](https://github.com/apocas/dockerode) and [fs-extra](https://github.com/jprichardson/node-fs-extra).


Updates `chalk` from 5.3.0 to 5.4.1
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v5.3.0...v5.4.1)

Updates `dockerode` from 4.0.2 to 4.0.4
- [Release notes](https://github.com/apocas/dockerode/releases)
- [Commits](https://github.com/apocas/dockerode/compare/v4.0.2...v4.0.4)

Updates `fs-extra` from 11.2.0 to 11.3.0
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.2.0...11.3.0)

---
updated-dependencies:
- dependency-name: chalk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: dockerode
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: fs-extra
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 18:05:24 -05:00
dependabot[bot] e0b1fd29ee
chore(deps): bump the /dev/deploy-to-container npm dependencies (#8440)
Bumps the npm group in /dev/deploy-to-container with 2 updates: [dockerode](https://github.com/apocas/dockerode) and [fs-extra](https://github.com/jprichardson/node-fs-extra).


Updates `dockerode` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/apocas/dockerode/releases)
- [Commits](https://github.com/apocas/dockerode/compare/v4.0.3...v4.0.4)

Updates `fs-extra` from 11.2.0 to 11.3.0
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.2.0...11.3.0)

---
updated-dependencies:
- dependency-name: dockerode
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
- dependency-name: fs-extra
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-02 18:04:24 -05:00
rjsparks 826f4d8747 ci: update base image target version to 20250128T1728 2025-01-28 17:39:50 +00:00
rjsparks 03d6d598ed ci: update base image target version to 20250117T1516 2025-01-17 15:28:12 +00:00
rjsparks d1d33e7ad5 ci: update base image target version to 20250116T2033 2025-01-16 20:44:55 +00:00
dependabot[bot] 135f759b30
chore(deps): bump dockerode in /dev/deploy-to-container in the npm group (#8393)
Bumps the npm group in /dev/deploy-to-container with 1 update: [dockerode](https://github.com/apocas/dockerode).


Updates `dockerode` from 4.0.2 to 4.0.3
- [Release notes](https://github.com/apocas/dockerode/releases)
- [Commits](https://github.com/apocas/dockerode/compare/v4.0.2...v4.0.3)

---
updated-dependencies:
- dependency-name: dockerode
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-13 15:02:45 -05:00
Robert Sparks e5c4a9f298
feat: additional filesystem monitoring (#8405)
* feat: additional filesystem monitoring

* chore: rename setting for tmp directory

* fix: restructure path to new endpoint

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2025-01-09 13:07:51 -06:00
Robert Sparks 8cadc6988f
chore: remove obviated manual INSTALL instructions (#8355) 2024-12-20 08:50:53 -06:00
dependabot[bot] 98b251487d
chore(deps): bump nanoid in /dev/deploy-to-container in the npm group (#8293)
Bumps the npm group in /dev/deploy-to-container with 1 update: [nanoid](https://github.com/ai/nanoid).


Updates `nanoid` from 5.0.8 to 5.0.9
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/5.0.8...5.0.9)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-13 19:15:44 -05:00
rjsparks a2f27d3d51 ci: update base image target version to 20241212T1741 2024-12-12 17:53:09 +00:00
rjsparks 6b77807c05 ci: update base image target version to 20241210T1557 2024-12-10 16:08:48 +00:00
Robert Sparks 2ec7a71edf
chore: remove unused setting from various settings_local templates (#8311) 2024-12-09 10:34:53 -06:00
Jennifer Richards 167752ba76
feat: log ASN (#8309)
* feat: log ip_src_asnum in nginx

* feat: log asn from gunicorn
2024-12-06 11:17:55 -06:00
rjsparks e5b6e330b1 ci: update base image target version to 20241127T2054 2024-11-27 21:05:52 +00:00
rjsparks 15f3ebd2d5 ci: update base image target version to 20241127T0116 2024-11-27 01:27:15 +00:00
Jennifer Richards 4b57602404
chore: log in-flight request lists on worker term (#8272)
* chore: log in-flight request lists on worker term

* style: Black

* chore: suppress empty in-flight logs

* chore: use list consistently
2024-11-25 12:51:44 -06:00
Nicolas Giard bdf753e052
chore: set gitattributes for normalizing line endings (#8245)
* chore: add proper .gitattributes

* chore: normalize file endings

* chore: fix .gitattributes

* chore: normalize file endings (2)
2024-11-20 16:48:00 -06:00
dependabot[bot] 7c025c9f2b
chore(deps): bump nanoid in /dev/deploy-to-container in the npm group (#8098)
Bumps the npm group in /dev/deploy-to-container with 1 update: [nanoid](https://github.com/ai/nanoid).


Updates `nanoid` from 5.0.7 to 5.0.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/5.0.7...5.0.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 12:59:39 -05:00
NGPixel 84a5aa3805 ci: update base image target version to 20241114T1954 2024-11-14 20:05:03 +00:00
Jennifer Richards 7293e10a64
feat: log start of gunicorn request (#8154)
* feat: log start of gunicorn request

* feat: add query string
2024-11-04 16:46:23 +00:00
Nicolas Giard d13b47064f
docs: update dev/tests/debug.sh 2024-10-29 22:47:31 -04:00
NGPixel 0d43663e9b ci: update base image target version to 20241029T1632 2024-10-29 16:43:21 +00:00
Jennifer Richards 8ec185cbb9
ci: fixed base image for prod (#8103) 2024-10-28 15:24:14 -05:00
dependabot[bot] db4ff66fbd
chore(deps): bump the npm group across 1 directory with 2 updates (#7789)
Bumps the npm group with 2 updates in the /dev/diff directory: [luxon](https://github.com/moment/luxon) and [tar](https://github.com/isaacs/node-tar).


Updates `luxon` from 3.4.4 to 3.5.0
- [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moment/luxon/compare/3.4.4...3.5.0)

Updates `tar` from 7.4.0 to 7.4.3
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.0...v7.4.3)

---
updated-dependencies:
- dependency-name: luxon
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 16:02:08 -04:00
dependabot[bot] 51f96eb952
chore(deps): bump tar in /dev/deploy-to-container in the npm group (#7793)
Bumps the npm group in /dev/deploy-to-container with 1 update: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.4.0 to 7.4.3
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.0...v7.4.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 16:01:15 -04:00
dependabot[bot] 39ba425089
build(deps): bump the npm group across 1 directory with 2 updates (#8021)
Bumps the npm group with 2 updates in the /dev/coverage-action directory: [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) and [luxon](https://github.com/moment/luxon).


Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `luxon` from 3.4.4 to 3.5.0
- [Changelog](https://github.com/moment/luxon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moment/luxon/compare/3.4.4...3.5.0)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: luxon
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 15:59:22 -04:00
Lars Eggert 35074660dc
chore: Prevent test suite artifact creation in work directory (#6438)
* chore: Prevent test suite artifact creation in work directory

Also remove a few other stale test assets while I'm here.

* Try and fix CI

* Change IDSUBMIT_REPOSITORY_PATH

* Make the dir

* test: clean up media/nomcom directories

* test: de-dup settings_temp_path_overrides

* chore: remove debug

* refactor: avoid premature import of test_utils

* refactor: drop useless lambda wrapper

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-09-18 14:08:01 -05:00
Jennifer Richards d8d52eedbf
feat: email ingestor api test endpoint (#7915)
* feat: email ingestor api test endpoint

* ci: add ingestion test token for sandbox

* chore: fix comments
2024-09-09 10:00:54 -05:00
Jennifer Richards 8f14dabcf5
ci: don't start if checks fail (#7674)
* ci: run checks when migrating

* ci: don't start if checks fail
2024-07-11 10:30:19 -05:00
Nicolas Giard ec1238d4fd
ci: disable coverage chart generation (#7672) 2024-07-10 20:53:49 -04:00
Nicolas Giard 5cc436cfb9
ci: fix coverage-action node version 2024-07-10 17:29:37 -04:00
Jennifer Richards 9c95689baf
ci: run migrations via init container (#7663)
* chore: split auth/dt/migration start

* chore: migrations via init container

* chore: no checks before migration

* chore: indicate celery start

* chore: additional log output
2024-07-10 15:33:03 -05:00
dependabot[bot] b6667a8ad2
chore(deps): bump tar in /dev/diff in the npm group across 1 directory (#7587)
Bumps the npm group with 1 update in the /dev/diff directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.1.0 to 7.4.0
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.1.0...v7.4.0)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 17:20:11 -04:00
dependabot[bot] b0e2e1877f
chore(deps): bump tar (#7586)
Bumps the npm group with 1 update in the /dev/deploy-to-container directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.1.0 to 7.4.0
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.1.0...v7.4.0)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-26 17:19:49 -04:00
Jennifer Richards c7d157e221
fix: enable gunicorn log config (#7600) 2024-06-26 16:02:26 -05:00
Jennifer Richards 6a96a69234
feat: improve / clean up logging (#7591)
* refactor: always use console log handler

* refactor: json for k8s, plain otherwise

* chore: remove syslog from wsgi.py

* chore: remove debug.log()

* chore: drop syslog from settings.py

* refactor: use log.log() in person.utils

* refactor: fetch_meeting_attendance->log.log()

* chore: gunicorn logs as JSON (wip)

* feat: better json log formatting

* refactor: improve log config

* feat: gunicorn access log fields

* fix: remove type hints

The gunicorn logger plays tricks with the
LogRecord args parameter to let it have string
keys instead of being a simple tuple.
The mypy tests rightly flag this. Rather
than fighting the typing, just remove the
hints and leave a comment warning not to
use the gunicorn-specific formatter with
other loggers.
2024-06-26 14:53:05 -05:00
Jennifer Richards 774fe78d3f
chore: gunicorn access logs / capture_output (#7534) 2024-06-14 10:43:06 -05:00
Jennifer Richards c1941df7e7
chore: adjustments for k8s deployment (#7531)
* chore: handle TERM in datatracker-start.sh

* chore: delay celery start if migration needed

* chore: skip-checks when migrating

* chore: label beat/celery as deleteBeforeUpgrade

Used by the infra-k8s deployment process to flag
these as needing to be shut down before a new
release rolls out.

* chore: increase termination grace periods
2024-06-14 09:28:14 -05:00
Matthew Holloway c1f1e1b830
fix: Formatting blockquotes in datatrackers rendered markdown (#7500)
* Formatting blockquotes in datatrackers rendered markdown

* Blockquote default formatting, with overrides for legacy blockquote

* Removing unnecessary 'richtext' CSS class

---------

Co-authored-by: Matthew Holloway <Matthew Holloway>
2024-06-06 15:42:23 -05:00
Nicolas Giard d344f5fd3c
ci: fix deploy-to-container script 2024-05-16 16:34:38 -04:00
Jennifer Richards b744f2b318 chore: switch back to uid/gid=1000 2024-05-13 21:41:36 -04:00
Jennifer Richards dd46a8af6f ci: use ietfa uid/gid for datatracker user (#7407)
* ci: use ietfa uid/gid for datatracker user

* chore: add comment
2024-05-13 21:41:36 -04:00
Jennifer Richards 8f87573144 ci: Fill in settings_local for docker 2024-05-13 21:41:36 -04:00
Jennifer Richards c8ee43da95 ci: run datatracker pod as non-root user (#7366)
* feat: patch_libraries management command

* ci: Patch libraries in docker img build

* ci: non-root datatracker user

* ci: securityContext for datatracker pod
2024-05-13 21:41:36 -04:00
Jennifer Richards 9379bbad7d ci: remove reminder comment 2024-05-13 21:41:36 -04:00
Jennifer Richards 6ccde89a68 ci: do not re-run yarn / collectstatics (#7353) 2024-05-13 21:41:36 -04:00
Jennifer Richards ebaf6b5680 ci: quotes around shell parameters 2024-05-13 21:41:36 -04:00