Models are missing PII annotations, and ModerationAuditLog isn't retired

Aperta
#301 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, python
Ambito
backend, ci-cd

Direzione di ricerca

Start with src/forum/backends/mysql/models.py and src/forum/backends/mysql/api.py, then inspect the PII check and pii_check tox configuration and the ci.yml matrix. Run make test-pii to see the current coverage. Done means every model has a docstring PII annotation, retirement scrubs or deletes ModerationAuditLog rows, and the PII check runs successfully in CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The openedx-forum 0.6.0 upgrade in openedx-platform is blocked because the new ModerationAuditLog model has no PII annotation, and make pii_check in openedx-platform fails on it. We're holding forum back to 0.5.x in the platform until this is fixed.

This repo's own PII check doesn't pass. Running the make test-pii command against v0.6.0:

Found 19 total models.
19 were eligible for annotation, 6 were annotated.
Coverage is 31.6%

None of the 13 forum.* models are annotated here. Up to now the platform has been carrying their annotations in its .annotation_safe_list.yml, so each new forum model breaks the platform's requirements upgrade instead of breaking CI in this repo. The check is never run here because pii_check isn't in the ci.yml matrix, and the pii_check tox env also fails on its own because it calls make without allowlist_externals.

ModerationAuditLog isn't cleared on retirement. It stores the moderated post's body and an original_author FK, but retire_all_content in src/forum/backends/mysql/api.py only scrubs Comment and CommentThread. A retired learner's post text stays in the audit log. This needs to be fixed before the model can be annotated with pii_retirement: local_api.

What needs to happen:

  • Add PII annotations to the docstrings of all the models in src/forum/backends/mysql/models.py.
  • Retire ModerationAuditLog rows in retire_all_content, either by scrubbing body or deleting them.
  • Fix the pii_check tox env and add it to the CI matrix.
  • Cut a release, then openedx-platform can drop its forum.* safe-list entries and unpin forum.
Lingua principale
Python
Stelle
5
Fork
28
Merge medio
12m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openedx/forum

Tutte le issue di openedx/forum

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.