docs: updates ticket annotations for block structure settings and toggles
Updates the annotations for the block structure settings and toggles based on a [discussion] that was held on the pull request that annotated those same settings and toggles. It also adds the DEPR tickets that were promised earlier in the annotations. For future reference, there's also a [forum thread] to discuss the DEPR tickets titled. [discussion]: https://github.com/edx/edx-platform/pull/26175#issuecomment-800632485 [forum thread]: https://discuss.openedx.org/t/deprecation-removal-several-block-structure-caching-settings-depr-143-depr-144-depr-145-depr-146/4288?u=nizar
This commit is contained in:
@@ -2686,20 +2686,22 @@ HEARTBEAT_CELERY_ROUTING_KEY = HIGH_PRIORITY_QUEUE
|
||||
# .. setting_default: dict of settings
|
||||
# .. setting_description: Stores all the settings used by block structures and block structure
|
||||
# related tasks. See BLOCK_STRUCTURES_SETTINGS[XXX] documentation for details of each setting.
|
||||
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/13388.
|
||||
BLOCK_STRUCTURES_SETTINGS = dict(
|
||||
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['COURSE_PUBLISH_TASK_DELAY']
|
||||
# .. setting_default: 30
|
||||
# .. setting_description: Delay, in seconds, after a new edit of a course is published before
|
||||
# updating the block structures cache. This is needed for a better chance at getting
|
||||
# the latest changes when there are secondary reads in sharded mongoDB clusters.
|
||||
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/13388 and
|
||||
# https://github.com/edx/edx-platform/pull/14571.
|
||||
COURSE_PUBLISH_TASK_DELAY=30,
|
||||
|
||||
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_DEFAULT_RETRY_DELAY']
|
||||
# .. setting_default: 30
|
||||
# .. setting_description: Delay, in seconds, between retry attempts if a block structure task
|
||||
# fails. For more information, check https://openedx.atlassian.net/browse/TNL-5041.
|
||||
# fails. For more information, check https://github.com/edx/edx-platform/pull/13388 and
|
||||
# https://github.com/edx/edx-platform/pull/14571.
|
||||
TASK_DEFAULT_RETRY_DELAY=30,
|
||||
|
||||
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['TASK_MAX_RETRIES']
|
||||
@@ -2707,7 +2709,8 @@ BLOCK_STRUCTURES_SETTINGS = dict(
|
||||
# .. setting_description: Maximum number of retries per block structure task.
|
||||
# If the maximum number of retries is exceeded, then you can attempt to either manually run
|
||||
# the celery task, or wait for it to be triggered again.
|
||||
# For more information, check https://openedx.atlassian.net/browse/TNL-5041.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/13388 and
|
||||
# https://github.com/edx/edx-platform/pull/14571.
|
||||
TASK_MAX_RETRIES=5,
|
||||
|
||||
# .. toggle_name: BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE']
|
||||
@@ -2718,11 +2721,12 @@ BLOCK_STRUCTURES_SETTINGS = dict(
|
||||
# are kept can be specified in the `BlockStructureConfiguration`, which can be edited in
|
||||
# Django Admin. The default number of versions that are kept is `5`.
|
||||
# .. toggle_warnings: This toggle will likely be deprecated and removed.
|
||||
# The annotation will be updated with the DEPR ticket once that process has started.
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2018-03-22
|
||||
# .. toggle_target_removal_date: 2018-06-22
|
||||
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-499
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14571,
|
||||
# https://github.com/edx/edx-platform/pull/17760,
|
||||
# https://openedx.atlassian.net/browse/DEPR-146
|
||||
PRUNING_ACTIVE=False,
|
||||
)
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@ from .models import BlockStructureConfiguration
|
||||
# courses are published. If `block_structure.storage_backing_for_cache` is active, all block
|
||||
# structures related to the published course are also cleared from storage.
|
||||
# .. toggle_warnings: This switch will likely be deprecated and removed.
|
||||
# The annotation will be updated with the DEPR ticket once that process has started.
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14571
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14358,
|
||||
# https://github.com/edx/edx-platform/pull/14571,
|
||||
# https://openedx.atlassian.net/browse/DEPR-144
|
||||
INVALIDATE_CACHE_ON_PUBLISH = WaffleSwitch(
|
||||
"block_structure.invalidate_cache_on_publish", __name__
|
||||
)
|
||||
@@ -40,7 +41,9 @@ INVALIDATE_CACHE_ON_PUBLISH = WaffleSwitch(
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512,
|
||||
# https://github.com/edx/edx-platform/pull/14770,
|
||||
# https://openedx.atlassian.net/browse/DEPR-145
|
||||
STORAGE_BACKING_FOR_CACHE = WaffleSwitch(
|
||||
"block_structure.storage_backing_for_cache", __name__
|
||||
)
|
||||
@@ -56,7 +59,9 @@ STORAGE_BACKING_FOR_CACHE = WaffleSwitch(
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512,
|
||||
# https://github.com/edx/edx-platform/pull/14770,
|
||||
# https://openedx.atlassian.net/browse/DEPR-143
|
||||
RAISE_ERROR_WHEN_NOT_FOUND = WaffleSwitch(
|
||||
"block_structure.raise_error_when_not_found", __name__
|
||||
)
|
||||
|
||||
@@ -40,6 +40,7 @@ def _directory_name(data_usage_key):
|
||||
# .. setting_default: ''
|
||||
# .. setting_description: Specifies the path in storage where block structures would be saved,
|
||||
# for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and on
|
||||
# `block_structure.storage_backing_for_cache`.
|
||||
directory_prefix = settings.BLOCK_STRUCTURES_SETTINGS.get('DIRECTORY_PREFIX', '')
|
||||
@@ -72,6 +73,7 @@ def _bs_model_storage():
|
||||
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']
|
||||
# .. setting_default: None
|
||||
# .. setting_description: Specifies the storage used for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `block_structure.storage_backing_for_cache`.
|
||||
storage_class = settings.BLOCK_STRUCTURES_SETTINGS.get('STORAGE_CLASS')
|
||||
|
||||
@@ -79,6 +81,7 @@ def _bs_model_storage():
|
||||
# .. setting_default: {}
|
||||
# .. setting_description: Specifies the keyword arguments needed to setup the storage, which
|
||||
# would be used for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and on
|
||||
# `block_structure.storage_backing_for_cache`.
|
||||
storage_kwargs = settings.BLOCK_STRUCTURES_SETTINGS.get('STORAGE_KWARGS', {})
|
||||
|
||||
Reference in New Issue
Block a user