Delete micromasters resources and remove ETLSource constant - #3670
Conversation
OpenAPI Changes8 changes: 7 error, 0 warning, 1 info Unexpected changes? Ensure your branch is up-to-date with |
There was a problem hiding this comment.
Pull request overview
Cleanup follow-up to the prior removal of the MicroMasters ETL by removing remaining database rows and eliminating the now-unused ETLSource.micromasters enum member so the codebase no longer exposes or depends on that source.
Changes:
- Add a data migration (
0118) to delete allLearningResourcerows withetl_source="micromasters". - Update historical migration
0052to use the"micromasters"string literal (removing dependency onETLSource.micromasters). - Remove
micromastersfrom theETLSourceenum.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| learning_resources/migrations/0118_delete_micromasters_resources.py | Deletes remaining DB rows for etl_source="micromasters" after the prior unpublish/deindex migration. |
| learning_resources/migrations/0052_learningresource_certification_type.py | Removes the migration’s dependency on ETLSource.micromasters by using a string literal. |
| learning_resources/etl/constants.py | Removes the ETLSource.micromasters enum member. |
| class ETLSource(ExtendedEnum): | ||
| """Enum of ETL sources""" | ||
|
|
||
| micromasters = "micromasters" | ||
| mit_edx = "mit_edx" | ||
| mitpe = "mitpe" | ||
| mitxonline = "mitxonline" |
e5354c0 to
b05c9ff
Compare
shanbady
left a comment
There was a problem hiding this comment.
change looks good just needs an update to the openapi spec
b05c9ff to
3ebe46d
Compare
|
openapi spec is up to date, errors are due to this being considered a breaking change ( "micromasters" is no longer a valid value for the |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3ebe46d to
4856d0f
Compare
What are the relevant tickets?
N/A — follow-up to #3663
Description (What does it do?)
Follow-up cleanup to #3663, which removed the micromasters ETL pipeline and unpublished/deindexed all remaining
etl_source=micromastersresources from OpenSearch and Qdrant.LearningResourcerows withetl_source="micromasters"via a new data migration (0118). No deindexing is needed — the resources were already removed from OpenSearch/Qdrant by the0117migration in Remove micromasters ETL #3663; related runs, content files, and relationship rows are removed by FK cascades.ETLSource.micromastersconstant.0052to use the"micromasters"string literal instead ofETLSource.micromasters.name, so historical migrations no longer depend on the removed enum member.How can this be tested?
docker compose run --rm web python manage.py migrate learning_resources—0118should apply cleanly and delete any remaining micromasters resources.docker compose run --rm web python manage.py makemigrations --check --dry-run— no model changes detected (etl_sourceis a plain CharField, so removing the enum member causes no schema drift).LearningResource.objects.filter(etl_source="micromasters").count()should be 0 after migrating.