refactor: rename toggle_warnings to toggle_warning (#30458)

Rename toggle_warnings to toggle_warning for consistency with setting_warning.
This commit is contained in:
Eugene Dyudyunov
2022-05-24 18:47:31 +03:00
committed by GitHub
parent e25e17ee88
commit b4fecd620b
35 changed files with 104 additions and 104 deletions

View File

@@ -16,7 +16,7 @@ from .models import BlockStructureConfiguration
# .. toggle_description: When enabled, the block structure cache is invalidated when changes to
# 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.
# .. toggle_warning: This switch will likely be deprecated and removed.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2017-02-23
# .. toggle_target_removal_date: 2017-05-23
@@ -34,7 +34,7 @@ INVALIDATE_CACHE_ON_PUBLISH = WaffleSwitch(
# like a database, which provides an additional backup for cache misses, instead having them
# regenerated. The regenration of block structures is a time consuming process. Therefore,
# enabling this switch is recommended for Production.
# .. toggle_warnings: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and
# .. toggle_warning: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and
# `BLOCK_STRUCTURES_SETTINGS['STORAGE_KWARGS']`.
# This switch will likely be deprecated and removed.
# The annotation will be updated with the DEPR ticket once that process has started.
@@ -54,7 +54,7 @@ STORAGE_BACKING_FOR_CACHE = WaffleSwitch(
# .. toggle_description: Raises an error if the requested block structure does not exist in block
# structure store, or if it is outdated. Block structure store refers to both cache and storage,
# if enabled.
# .. toggle_warnings: This switch will likely be deprecated and removed.
# .. toggle_warning: 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

View File

@@ -61,7 +61,7 @@ class CookieNameChange:
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: Used to enable CookieNameChange middleware which changes a cookie name in request.COOKIES
# .. toggle_warnings: This should be set at the same time you set COOKIE_NAME_CHANGE_EXPAND_INFO setting
# .. toggle_warning: This should be set at the same time you set COOKIE_NAME_CHANGE_EXPAND_INFO setting
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2021-08-04
# .. toggle_target_removal_date: 2021-10-01

View File

@@ -12,7 +12,7 @@ COURSE_APPS_WAFFLE_NAMESPACE = 'course_apps'
# .. toggle_default: False
# .. toggle_description: When enabled, users will be directed to a new proctoring settings
# modal on the Pages and Resources view when accessing proctored exam settings.
# .. toggle_warnings: None
# .. toggle_warning: None
# .. toggle_creation_date: 2021-08-17
# .. toggle_target_removal_date: None
PROCTORING_SETTINGS_MODAL_VIEW = CourseWaffleFlag(

View File

@@ -14,6 +14,6 @@ WAFFLE_NAMESPACE = 'course_live'
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2022-03-02
# .. toggle_target_removal_date: 2022-06-02
# .. toggle_warnings: When the flag is ON, the course live app will be visible in the course authoring mfe
# .. toggle_warning: When the flag is ON, the course live app will be visible in the course authoring mfe
# .. toggle_tickets: TNL-9603
ENABLE_COURSE_LIVE = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.enable_course_live', __name__)

View File

@@ -11,7 +11,7 @@ from openedx.core.djangoapps.site_configuration import helpers as config_helpers
# .. toggle_default: True
# .. toggle_description: Enable learner records for the whole platform. This setting may be overridden by site- and
# org-specific site configurations with the same name.
# .. toggle_warnings: Enabling this feature requires that the definition of the ``CREDENTIALS_PUBLIC_SERVICE_URL``
# .. toggle_warning: Enabling this feature requires that the definition of the ``CREDENTIALS_PUBLIC_SERVICE_URL``
# setting.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-10-01

View File

@@ -15,7 +15,7 @@ WAFFLE_NAMESPACE = 'discussions'
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-06-15
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: When the flag is ON, the discussion settings will be available on legacy experience.
# .. toggle_warning: When the flag is ON, the discussion settings will be available on legacy experience.
# .. toggle_tickets: TNL-8389
OVERRIDE_DISCUSSION_LEGACY_SETTINGS_FLAG = CourseWaffleFlag(
f'{WAFFLE_NAMESPACE}.override_discussion_legacy_settings', __name__
@@ -29,7 +29,7 @@ OVERRIDE_DISCUSSION_LEGACY_SETTINGS_FLAG = CourseWaffleFlag(
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2021-05-24
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: When the flag is ON, the new experience for Pages and Resources will be enabled.
# .. toggle_warning: When the flag is ON, the new experience for Pages and Resources will be enabled.
# .. toggle_tickets: TNL-7791
ENABLE_PAGES_AND_RESOURCES_MICROFRONTEND = CourseWaffleFlag(
f'{WAFFLE_NAMESPACE}.pages_and_resources_mfe', __name__

View File

@@ -106,7 +106,7 @@ from openedx.core.lib.mobile_utils import is_request_from_mobile_app
# information on the request. This will also track the location where the change is coming from to quickly find
# issues. If user verification fails at response time, all of the information about these
# changes will be logged.
# .. toggle_warnings: Adds some processing overhead to all requests to gather debug info. Will also double the logging
# .. toggle_warning: Adds some processing overhead to all requests to gather debug info. Will also double the logging
# for failed verification checks.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2021-03-25
@@ -120,7 +120,7 @@ LOG_REQUEST_USER_CHANGES = getattr(settings, 'LOG_REQUEST_USER_CHANGES', False)
# any user id change detected by safe sessions. The headers will provide additional debugging information. The
# headers will be logged for all requests up until LOG_REQUEST_USER_CHANGE_HEADERS_DURATION seconds after
# the time of the last mismatch. The header details will be encrypted, and only available with the private key.
# .. toggle_warnings: Logging headers of subsequent requests following a mismatch will only work if
# .. toggle_warning: Logging headers of subsequent requests following a mismatch will only work if
# LOG_REQUEST_USER_CHANGES is enabled and ENFORCE_SAFE_SESSIONS is disabled; otherwise, only headers of the inital
# mismatch will be logged. Also, SAFE_SESSIONS_DEBUG_PUBLIC_KEY must be set. See
# https://github.com/edx/edx-platform/blob/master/common/djangoapps/util/log_sensitive.py
@@ -142,7 +142,7 @@ LOG_REQUEST_USER_CHANGE_HEADERS_DURATION = getattr(settings, 'LOG_REQUEST_USER_C
# response cancelled (changed to an error). This is intended as a backup
# safety measure in case an attacker (or bug) is able to change the user
# on a session in an unexpected way.
# .. toggle_warnings: Should be disabled if debugging mismatches using the
# .. toggle_warning: Should be disabled if debugging mismatches using the
# LOG_REQUEST_USER_CHANGE_HEADERS toggle, otherwise series of mismatching
# requests from the same user cannot be investigated. Additionally, if
# enabling for the first time, confirm that incidences of the string

View File

@@ -13,7 +13,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2019-04-11
# .. toggle_target_removal_date: 2020-12-31
# .. toggle_warnings: Also set settings.ORDER_HISTORY_MICROFRONTEND_URL and site's
# .. toggle_warning: Also set settings.ORDER_HISTORY_MICROFRONTEND_URL and site's
# ENABLE_ORDER_HISTORY_MICROFRONTEND.
# .. toggle_tickets: DEPR-17
REDIRECT_TO_ORDER_HISTORY_MICROFRONTEND = WaffleFlag('order_history.redirect_to_microfrontend', __name__)
@@ -34,7 +34,7 @@ def should_redirect_to_order_history_microfrontend():
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2019-04-30
# .. toggle_target_removal_date: 2021-12-31
# .. toggle_warnings: Also set settings.ACCOUNT_MICROFRONTEND_URL.
# .. toggle_warning: Also set settings.ACCOUNT_MICROFRONTEND_URL.
# .. toggle_tickets: DEPR-17
REDIRECT_TO_ACCOUNT_MICROFRONTEND = WaffleFlag('account.redirect_to_microfrontend', __name__)

View File

@@ -15,7 +15,7 @@ _WAFFLE_NAMESPACE = 'user_authn'
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2019-11-20
# .. toggle_target_removal_date: 2020-01-31
# .. toggle_warnings: Requires THIRD_PARTY_AUTH_ONLY_DOMAIN to also be set.
# .. toggle_warning: Requires THIRD_PARTY_AUTH_ONLY_DOMAIN to also be set.
# .. toggle_tickets: ENT-2461
ENABLE_LOGIN_USING_THIRDPARTY_AUTH_ONLY = WaffleSwitch(
f'{_WAFFLE_NAMESPACE}.enable_login_using_thirdparty_auth_only', __name__

View File

@@ -15,7 +15,7 @@ from openedx.core.djangoapps.theming.helpers import get_current_request
# authentication with third party auth
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-09-16
# .. toggle_warnings: Requires configuration of third party auth
# .. toggle_warning: Requires configuration of third party auth
def is_require_third_party_auth_enabled():

View File

@@ -114,7 +114,7 @@ REGISTER_USER = Signal()
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-04-30
# .. toggle_target_removal_date: 2020-06-01
# .. toggle_warnings: This temporary feature toggle does not have a target removal date.
# .. toggle_warning: This temporary feature toggle does not have a target removal date.
REGISTRATION_FAILURE_LOGGING_FLAG = WaffleFlag('registration.enable_failure_logging', __name__)
REAL_IP_KEY = 'openedx.core.djangoapps.util.ratelimit.real_ip'

View File

@@ -29,7 +29,7 @@ DEPRECATE_YOUTUBE = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.deprecate_youtube', __
# of enabling this feature toggle are uncertain.]
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2020-03-12
# .. toggle_warnings: Enabling this feature requires that the ROLE_ARN, MFA_SERIAL_NUMBER, MFA_TOKEN settings are
# .. toggle_warning: Enabling this feature requires that the ROLE_ARN, MFA_SERIAL_NUMBER, MFA_TOKEN settings are
# properly defined.
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/23375
ENABLE_DEVSTACK_VIDEO_UPLOADS = WaffleFlag(f'{WAFFLE_NAMESPACE}.enable_devstack_video_uploads', __name__, LOG_PREFIX)