Fix pre-existing PII annotation debt and add pii_check to CI
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
Research direction
Start with .annotation_safe_list.yml, the model files under src/, and .github/workflows/ci.yml; run tox -e pii_check to reproduce the duplicate and uncovered-model failures. Review each listed model's data and add exactly one accurate annotation, remove the two redundant safelist entries, add pii_check to the CI matrix, and confirm the check passes with 100% coverage.
Written by the indexing model from the issue text.
Description
Background
make pii_check runs code_annotations against every Django model in openedx-core's own
tree and requires each one to carry a .. no_pii: (or .. pii:) annotation, either inline in
the model's docstring or as an entry in .annotation_safe_list.yml. tox.ini's envlist
already includes a pii_check environment, but .github/workflows/ci.yml's test matrix lists
toxenv: ["django52", "package", "quality", "docs"], which does not include it. CI never runs
pii_check, so nothing currently blocks a merge that breaks it, and two problems have
accumulated on main as a result, confirmed by running tox -e pii_check directly:
Two models are double-covered, which is a lint error, not a coverage gap.
openedx_content.Draft and openedx_content.PublishableEntityVersion each carry an inline
.. no_pii: annotation in their own docstring (src/openedx_content/applets/publishing/models/draft_log.py
and .../models/publishable_entity.py), and each also has a now-redundant entry in
.annotation_safe_list.yml. code_annotations treats a model with both as annotated twice and
fails with a lint error rather than a coverage number:
openedx_content.Draft is annotated, but also in the safelist.
openedx_content.PublishableEntityVersion is annotated, but also in the safelist.
Twenty models are uncovered, confirmed by removing those two stale safelist entries and
re-running tox -e pii_check: 67 models total, 47 annotated, 20 uncovered, 70.1% coverage
against a 100% target. The twenty:
- Seven
oel_*backcompat shim models:oel_collections.Collection,oel_components.Component,
oel_publishing.Container,oel_publishing.DraftChangeLog,oel_publishing.DraftChangeLogRecord,
oel_publishing.LearningPackage,oel_publishing.PublishableEntity - Two
openedx_catalogmodels:CatalogCourse,CourseRun - Three
openedx_contentmodels:ComponentVersionMedia,ContainerType,Media - Two models from the installed
edx-organizationspackage:organizations.HistoricalOrganization,
organizations.HistoricalOrganizationCourse - Six test-only models in
test_django_app:ContainerContainer,ContainerContainerVersion,
TestContainer,TestContainerVersion,TestEntity,TestEntityVersion
None of these twenty are models that #613 (the CBE competency models) adds, and none of #613's
own PRs touch them. This debt predates #613 and is unrelated to it.
What to do
- Remove the
openedx_content.Draftandopenedx_content.PublishableEntityVersionentries
from.annotation_safe_list.yml; both are already covered by their own inline annotation. - Annotate each of the twenty uncovered models above as
.. no_pii:or.. pii:, whichever is
accurate, either inline in the model's own docstring (for a model defined in this repo's
src/) or in.annotation_safe_list.yml(for a model defined in an installed package, such
as the twoorganizations.Historical*models). - Add
pii_checkto thetoxenvlist in.github/workflows/ci.yml's test matrix, so a future
PR that breaks PII coverage or introduces a double-covered model fails CI instead of only
failing silently for whoever happens to runmake pii_checklocally.
Acceptance criteria
-
tox -e pii_checkpasses locally with no lint error and 100% coverage. -
.github/workflows/ci.yml's test matrix includespii_checkintoxenv, and the CI run
on the pull request shows apii_checkjob that passes. - No model's annotation is both inline and in the safelist at once.
- Every one of the twenty models listed above carries exactly one annotation, inline or in
the safelist, accurately describing whether it stores personal data.
Out of scope
Anything in #613, #641, or #642: the CBE competency models, their own PII annotations, and the
openedx-platform safelist entries for them. This issue is unrelated to that work and does not
block or get blocked by it.
- Dominant language
- Python
- Stars
- 10
- Forks
- 33
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openedx/openedx-core
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
openedx/openedx-core#831 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
openedx/openedx-core#827 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
openedx/openedx-core#855 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
openedx/openedx-core#843 ·
Maintainers usually reply within 1 day
-
[BE] Course search: accept ISO 8601 datetimes in the start date filterPossibly taken @alezconsultant claimed this 9 days ago. Open
openedx/openedx-core#842 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in openedx/openedx-core
Similar issues
-
first
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AcademySoftwareFoundation/rmtc#54 · 1 comment ·
-
feature/cohorts feature/feature-flags team/feature-flags
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
License examples/ as MITPossibly taken @PGrayCS claimed this today. Opendocumentation enhancement example good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
speedyk-005/yasbd-lib#383 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
interactions-py/interactions.py#1827 ·
-
Managed start can fail when OpenVMM reads its control capability before NVX writes itPossibly taken @ppenna claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day