fix: Remove deprecated coreapi dependency#178
Open
vgulati-apphelix wants to merge 2 commits intomasterfrom
Open
fix: Remove deprecated coreapi dependency#178vgulati-apphelix wants to merge 2 commits intomasterfrom
vgulati-apphelix wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated coreapi dependency and switches the service to Django REST Framework’s built-in OpenAPI schema generation, while also regenerating pinned dependency lockfiles as part of the upgrade process.
Changes:
- Dropped
coreapi(and transitivecoreschema) from the dependency set. - Updated DRF schema configuration to use
rest_framework.schemas.openapi.AutoSchema. - Regenerated pinned requirements across environments (base/dev/test/doc/production/tox/pip tooling).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
requirements/base.in |
Removes the direct coreapi dependency from the base input requirements. |
analyticsdataserver/settings/base.py |
Switches DRF DEFAULT_SCHEMA_CLASS from CoreAPI-based schema to OpenAPI-based schema. |
requirements/base.txt |
Updates locked runtime dependency versions and removes coreapi/coreschema from the compiled set. |
requirements/dev.txt |
Updates locked dev dependency versions and removes coreapi/coreschema from the compiled set. |
requirements/test.txt |
Updates locked test dependency versions and removes coreapi/coreschema (and related transitive pins). |
requirements/production.txt |
Updates locked production dependency versions and removes coreapi/coreschema (and related transitive pins). |
requirements/doc.txt |
Updates locked documentation build dependency versions and removes coreapi/coreschema from the compiled set. |
requirements/django.txt |
Bumps the pinned Django patch version in the dedicated Django pin file. |
requirements/tox.txt |
Updates tox/virtualenv toolchain pins used for CI/test orchestration. |
requirements/pip_tools.txt |
Updates pins for pip-tools-related build tooling. |
requirements/pip.txt |
Updates pins for pip/wheel/setuptools-related tooling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
ttak-apphelix
approved these changes
Apr 17, 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.
Description
Alert - Failure: Devstack provisioning tests for analyticsapi+insights+lms #22222673915
https://github.com/edx/devstack/actions/runs/22222673915
The error was caused by coreapi package not being able to import pkg_resources. This happens because:
Since coreapi itself it deprecated and there is direct replacement OpenAPI available. This PR take care of replacing
Ticket
BOMS-480
Remove coreapi deprecated dependency
This PR removes the deprecated coreapi library and migrates to Django REST Framework's built-in OpenAPI schema generation.
Changes
Testing
Provision ran successfully
Test failure
command - make test
This was yielding 3 failures
====================== short test summary info =======================
FAILED analytics_data_api/management/commands/tests/test_generate_fake_course_data.py::GenerateFakeCourseDataTests::testNormalRun - TypeError: 'float' object cannot be interpreted as an integer
FAILED analytics_data_api/management/commands/tests/test_generate_stage_course_data.py::GenerateStageCourseDataTests::test_run_with_no_preexisting_data - TypeError: 'float' object cannot be interpreted as an integer
FAILED analytics_data_api/management/commands/tests/test_generate_stage_course_data.py::GenerateStageCourseDataTests::test_run_with_preexisting_data - TypeError: 'float' object cannot be interpreted as an integer
============ 3 failed, 275 passed, 299 warnings in 52.71s ============
Below change in generate_data.py fixes the failures
count = random.randint(0, max_value // 20) instead of count = random.randint(0, max_value / 20)