feat!: assume & remove BLOCKSTORE_USE_BLOCKSTORE_APP_API (#33765)
Originally, Blockstore was an independent micro-service, accessed via a REST API. Then, we changed Blockstore so it could be installed as an in-process Django app. To support both modes, there existed a blockstore_api wrapper library in edx-platform, with toggles controlling whether the wrapper called out to the micro-service's REST API versus the Django app's Python API. Now that the micro-service Blockstore implementation is deprecated, though, this wrapper library and toggles are just unnecessary complexity. As a first step towards cleanup, we: * remove several toggles and settings (details below); * remove the blocokstore_api wrapper methods which called the REST API and marshalled them back into Python objects; and * remove all test cases which relied on the Blockstore micro-service (and were skippped in CI). In the future, we will remove the content libraries indexer, clean up the remaining bits of blockstore_api, and flatten out all the Blockstore-related test class hierarchies which are no longer nceessary. BREAKING CHANGE: * These Django settings are removed: * BLOCKSTORE_PUBLIC_URL_ROOT * BLOCKSTORE_API_URL * BLOCKSTORE_API_AUTH_TOKEN * BLOCKSTORE_USE_BLOCKSTORE_APP_API * The blockstore.use_blockstore_app_api Waffle switch is removed. * edx-platform will act as it did when the DJango setting BLOCKSTORE_USE_BLOCKSTORE_APP_API or the Waffle switch blockstore.use_blockstore_app_api were enabled. That is, any running Blockstore micro-service instance will be ignored, and the Blockstore package which is installed into edx-platform will be used instead. Ref: https://github.com/openedx/blockstore/issues/296
This commit is contained in:
@@ -115,7 +115,6 @@ from lms.envs.common import (
|
||||
ENTERPRISE_BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL,
|
||||
|
||||
# Blockstore
|
||||
BLOCKSTORE_USE_BLOCKSTORE_APP_API,
|
||||
BUNDLE_ASSET_STORAGE_SETTINGS,
|
||||
|
||||
# Methods to derive settings
|
||||
@@ -2606,8 +2605,7 @@ PROCTORING_BACKENDS = {
|
||||
PROCTORING_SETTINGS = {}
|
||||
|
||||
################## BLOCKSTORE RELATED SETTINGS #########################
|
||||
BLOCKSTORE_PUBLIC_URL_ROOT = 'http://localhost:18250'
|
||||
BLOCKSTORE_API_URL = 'http://localhost:18250/api/v1/'
|
||||
|
||||
# Which of django's caches to use for storing anonymous user state for XBlocks
|
||||
# in the blockstore-based XBlock runtime
|
||||
XBLOCK_RUNTIME_V2_EPHEMERAL_DATA_CACHE = 'default'
|
||||
|
||||
@@ -40,8 +40,6 @@ AWS_SES_REGION_ENDPOINT: email.us-east-1.amazonaws.com
|
||||
AWS_SES_REGION_NAME: us-east-1
|
||||
AWS_STORAGE_BUCKET_NAME: SET-ME-PLEASE (ex. bucket-name)
|
||||
BASE_COOKIE_DOMAIN: localhost
|
||||
BLOCKSTORE_API_URL: http://localhost:18250/api/v1
|
||||
BLOCKSTORE_PUBLIC_URL_ROOT: http://localhost:18250
|
||||
BLOCK_STRUCTURES_SETTINGS:
|
||||
COURSE_PUBLISH_TASK_DELAY: 30
|
||||
TASK_DEFAULT_RETRY_DELAY: 30
|
||||
|
||||
@@ -27,8 +27,6 @@ from .common import *
|
||||
|
||||
# import settings from LMS for consistent behavior with CMS
|
||||
from lms.envs.test import ( # pylint: disable=wrong-import-order
|
||||
BLOCKSTORE_USE_BLOCKSTORE_APP_API,
|
||||
BLOCKSTORE_API_URL,
|
||||
COMPREHENSIVE_THEME_DIRS, # unimport:skip
|
||||
DEFAULT_FILE_STORAGE,
|
||||
ECOMMERCE_API_URL,
|
||||
@@ -184,10 +182,6 @@ CACHES = {
|
||||
}
|
||||
|
||||
############################### BLOCKSTORE #####################################
|
||||
# Blockstore tests
|
||||
RUN_BLOCKSTORE_TESTS = os.environ.get('EDXAPP_RUN_BLOCKSTORE_TESTS', 'no').lower() in ('true', 'yes', '1')
|
||||
BLOCKSTORE_API_URL = os.environ.get('EDXAPP_BLOCKSTORE_API_URL', "http://edx.devstack.blockstore-test:18251/api/v1/")
|
||||
BLOCKSTORE_API_AUTH_TOKEN = os.environ.get('EDXAPP_BLOCKSTORE_API_AUTH_TOKEN', 'edxapp-test-key')
|
||||
BUNDLE_ASSET_STORAGE_SETTINGS = dict(
|
||||
STORAGE_CLASS='django.core.files.storage.FileSystemStorage',
|
||||
STORAGE_KWARGS=dict(
|
||||
|
||||
Reference in New Issue
Block a user