Skip to content

refactor!: remove HomePageCourses API v1 [DEPR]#38742

Open
irfanuddinahmad wants to merge 2 commits into
openedx:masterfrom
irfanuddinahmad:irfan/depr-remove-home-page-courses-api-v1
Open

refactor!: remove HomePageCourses API v1 [DEPR]#38742
irfanuddinahmad wants to merge 2 commits into
openedx:masterfrom
irfanuddinahmad:irfan/depr-remove-home-page-courses-api-v1

Conversation

@irfanuddinahmad

Copy link
Copy Markdown
Contributor

Summary

  • Removes the HomePageCourses API v1 endpoint (GET /api/contentstore/v1/home/courses) which has been superseded by v2 since Sumac and is no longer referenced by the Authoring MFE
  • Removes CourseHomeTabSerializer (exclusively used by the removed view)
  • Removes HomePageCoursesViewTest and the unused imports it introduced (OrderedDict, datetime, timedelta, pytz, CourseOverviewFactory)
  • Removes unused get_course_context import from views/home.py

Closes openedx/public-engineering#287

Test plan

  • Existing HomePageViewTest and HomePageLibrariesViewTest still pass
  • GET /api/contentstore/v1/home/courses returns 404
  • GET /api/contentstore/v1/home and GET /api/contentstore/v1/home/libraries still return 200

🤖 Generated with Claude Code

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jun 11, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @irfanuddinahmad!

This repository is currently maintained by @openedx/wg-maintenance-openedx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated v1 “HomePageCourses” endpoint (GET /api/contentstore/v1/home/courses) from the CMS contentstore REST API, along with its serializer and associated v1 tests, aligning the codebase with the v2 endpoint that has superseded it.

Changes:

  • Removed HomePageCoursesView from v1 views and routing (home/courses), so the endpoint is no longer exposed.
  • Removed CourseHomeTabSerializer, which was only used by the deleted v1 endpoint.
  • Deleted the v1 test class dedicated to the removed endpoint and cleaned up now-unused imports.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cms/djangoapps/contentstore/rest_api/v1/views/tests/test_home.py Removes v1 tests and imports that only existed to cover the deleted home/courses endpoint.
cms/djangoapps/contentstore/rest_api/v1/views/home.py Deletes HomePageCoursesView and its related imports.
cms/djangoapps/contentstore/rest_api/v1/views/__init__.py Stops exporting the removed v1 view.
cms/djangoapps/contentstore/rest_api/v1/urls.py Removes the home/courses route and HomePageCoursesView import.
cms/djangoapps/contentstore/rest_api/v1/serializers/home.py Removes CourseHomeTabSerializer since the endpoint is deleted.
cms/djangoapps/contentstore/rest_api/v1/serializers/__init__.py Stops exporting the removed serializer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cms/djangoapps/contentstore/rest_api/v1/urls.py
Irfan Ahmad and others added 2 commits June 11, 2026 15:38
Removes the HomePageCourses API v1 endpoint (GET /api/contentstore/v1/home/courses)
as it has been superseded by v2 since the Sumac release and is no longer used
by the Authoring MFE.

Removes:
- HomePageCoursesView and its URL from contentstore v1
- CourseHomeTabSerializer (only used by the removed view)
- All associated tests (HomePageCoursesViewTest)
- Unused imports (get_course_context, CourseHomeTabSerializer)

Closes: openedx/public-engineering#287

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The v2 test setUp was still calling reverse("cms.djangoapps.contentstore:v1:courses")
but the result was never used. Now that the v1 URL is removed this would raise
NoReverseMatch, so drop the unused line.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@irfanuddinahmad irfanuddinahmad force-pushed the irfan/depr-remove-home-page-courses-api-v1 branch from fe9a80f to e702c3a Compare June 11, 2026 10:38
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Jun 11, 2026
@mphilbrick211 mphilbrick211 added the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Jun 11, 2026

@farhan farhan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). needs reviewer assigned PR needs to be (re-)assigned a new reviewer open-source-contribution PR author is not from Axim or 2U

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

[DEPR]: Remove HomePageCourses API v1

5 participants