Preserve course subjects across discovery syncs and document the precedence rule#63
Draft
Preserve course subjects across discovery syncs and document the precedence rule#63
Conversation
…rve subjects in full metadata update Agent-Logs-Url: https://github.com/edx/enterprise-catalog/sessions/046b734f-760b-4c27-9d31-24eb6f288e98 Co-authored-by: macdiesel <67862+macdiesel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing categories and subcategories in course queries
Fix missing subjects (categories/subcategories) in catalog API course metadata
Mar 31, 2026
Copilot
AI
changed the title
Fix missing subjects (categories/subcategories) in catalog API course metadata
Keep course subjects populated across catalog syncs
Mar 31, 2026
Agent-Logs-Url: https://github.com/edx/enterprise-catalog/sessions/8519e93e-7fd7-4c48-99de-aec88c64baad Co-authored-by: macdiesel <67862+macdiesel@users.noreply.github.com>
Copilot
AI
changed the title
Keep course subjects populated across catalog syncs
Preserve course subjects across discovery sync paths
Mar 31, 2026
Copilot
AI
changed the title
Preserve course subjects across discovery sync paths
Preserve course subjects across discovery syncs and document the precedence rule
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Course
subjectswere being populated through two discovery sync paths with different overwrite behavior, which led to inconsistent categories/subcategories across otherwise similar courses. This change aligns subject handling across incremental and full metadata updates, and captures the rule in an ADR.Keep
subjectsfresh during incremental syncssubjectstoCOURSE_FIELDS_TO_PLUCK_FROM_SEARCH_ALL./api/v1/search/all/without replacing the rest of the stored full-course payload.Prevent empty full-course payloads from erasing known-good subjects
_update_single_full_course_record()so an empty or missingsubjectsvalue from/api/v1/courses/does not overwrite an existing non-empty value.subjectsfrom the full payload still replace the stored value.Document the decision
docs/decisions/0010-preserving-course-subjects-across-syncs.rst./search/all/and/courses/subjects