Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEPR]: Remove HomePageCourses API v1 #287

Open
4 tasks
BryanttV opened this issue Jan 28, 2025 · 9 comments
Open
4 tasks

[DEPR]: Remove HomePageCourses API v1 #287

BryanttV opened this issue Jan 28, 2025 · 9 comments
Labels
depr Proposal for deprecation & removal per OEP-21

Comments

@BryanttV
Copy link

BryanttV commented Jan 28, 2025

Proposal Date

2025-01-28

Target Ticket Acceptance Date

2025-02-11

Earliest Open edX Named Release Without This Functionality

Ulmo - 2025-10

Rationale

The HomePageCourses API v1 will be replaced by v2, which offers improvements including pagination, filtering, and sorting. As of Sumac, v2 is the default API used to query the course listing from Studio.

Removal

To completely remove the API v1 in edx-platform it’s necessary:

Also, it's necessary to remove all references to API v1 in the Authoring MFE. This work is in progress:

Replacement

API v2 completely replaces API v1. The PRs related to functionality are as follows:

Deprecation

API v1 will be marked as deprecated in the platform code in Teak. This will remain so until Ulmo, where it will be removed.

As the feature toggle to enable/disable API v2 will be removed, API v1 will have an internal change, as it will get the courses summary from CourseOverview.get_all_courses(), which implies that it will not query the courses from Mongo, but from MySQL.

Migration

As of the Sumac release the default API v1 is not being used, the authoring MFE uses API v2. If for some reason you are still using v1 we recommend to start using v2 which was based on the previous one, but with some improvements.

It's important to note that the format of the API v2 response has changed a bit with respect to API v1. Previously, courses and archived_courses were returned in separate lists, now all courses are returned in the courses property. Archived courses contain the is_active property set to false.

Additional Info

No response

Task List

@github-actions github-actions bot added the depr Proposal for deprecation & removal per OEP-21 label Jan 28, 2025
@BryanttV
Copy link
Author

Hi @mariajgrimaldi @feanil @bradenmacdonald. Could you check this proposal?

@bradenmacdonald
Copy link

Removing v1 from the authoring MFE ASAP makes sense. On the platform side, I'm just wondering if we need to mark it as deprecated in Teak and then remove it in the next release, to give API consumers more time to adjust.

@BryanttV
Copy link
Author

Thanks for your comment @bradenmacdonald. Yeah, I think it's better to mark the code as deprecated for Teak, and finally, in Ulmo remove it. I can update the proposal, what do you think? @mariajgrimaldi @feanil

@mariajgrimaldi
Copy link
Member

Thank you both! I believe removing the usage of V1 from authoring is the most critical task. If that happens for Teak, I agree that we can extend the date to allow more time for adjustments.

@BryanttV: Can we include that as the migration path? We should also give some indications of what to do to migrate from V1 to V2.

@BryanttV
Copy link
Author

Hi @mariajgrimaldi, I updated the Deprecation and Migration section. Also, I included the PR related to removal of the feature toggle in the Task List.

@mariajgrimaldi
Copy link
Member

@bradenmacdonald @feanil: we created this PR to drop the use of ENABLE_HOME_PAGE_COURSE_API_V2 in edx-platform. These changes remove the option of using the old V1 behavior of getting the courses from Mongo instead of MySQL. Do you think this might be a breaking change for instances with old courses?

In any case, let's let 2U know about this change, considering the work off of the master. FYI @timmc-edx, can you help us tag whoever might be interested in this change?

@timmc-edx
Copy link

This is all CMS, right? That would be 2U's TNL team. I'll ask someone to come take a look.

@mariajgrimaldi
Copy link
Member

@timmc-edx: yes, it is! Thank you.

@hinakhadim
Copy link

hinakhadim commented Feb 14, 2025

Acknowledging on behalf of TNL team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depr Proposal for deprecation & removal per OEP-21
Projects
Status: Proposed
Development

No branches or pull requests

5 participants