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)

View File

@@ -14,7 +14,7 @@ from edx_toggles.toggles import WaffleSwitch
# .. toggle_creation_date: 2022-01-13
# .. toggle_target_removal_date: None
# .. toggle_tickets: TNL-8705, BD-14
# .. 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.
BLOCKSTORE_USE_BLOCKSTORE_APP_API = WaffleSwitch(
'blockstore.use_blockstore_app_api', __name__
)

View File

@@ -174,7 +174,7 @@ class ExpectedErrorMiddleware:
# .. toggle_implementation: DjangoSetting
# .. toggle_default: False
# .. toggle_description: If True, the stacktrace will be included with the logging message.
# .. toggle_warnings: Requires ``LOG_ERROR`` to be set to True, otherwise this value will be ignored.
# .. toggle_warning: Requires ``LOG_ERROR`` to be set to True, otherwise this value will be ignored.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2021-03-11

View File

@@ -11,7 +11,7 @@ def plugin_settings(settings):
on the sidebar of the learner dashboard. Announcements can be created by Global Staff
users on maintenance dashboard of studio. Maintenance dashboard can accessed at
https://{studio.domain}/maintenance
.. toggle_warnings: TinyMCE is needed to show an editor in the studio.
.. toggle_warning: TinyMCE is needed to show an editor in the studio.
.. toggle_use_cases: open_edx
.. toggle_creation_date: 2017-11-08
.. toggle_tickets: https://github.com/edx/edx-platform/pull/16496

View File

@@ -34,7 +34,7 @@ COURSE_PRE_START_ACCESS_FLAG = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.pre_start_ac
# .. toggle_use_cases: opt_out, temporary
# .. toggle_creation_date: 2017-09-11
# .. toggle_target_removal_date: None
# .. 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.
ENABLE_COURSE_GOALS = CourseWaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.enable_course_goals', __name__) # lint-amnesty, pylint: disable=toggle-missing-annotation
# Waffle flag to enable anonymous access to a course
@@ -50,7 +50,7 @@ COURSE_ENABLE_UNENROLLED_ACCESS_FLAG = CourseWaffleFlag( # lint-amnesty, pylint
# course view showing key course dates. Was previously an ExperimentWaffleFlag with experiment_id=17.
# .. toggle_use_cases: opt_in
# .. toggle_creation_date: 2020-02-10
# .. toggle_warnings: To set a relative due date for self-paced courses, the weeks_to_complete field for a course run
# .. toggle_warning: To set a relative due date for self-paced courses, the weeks_to_complete field for a course run
# needs to be set. Currently it can be set through the publisher app.
# .. toggle_tickets: https://openedx.atlassian.net/browse/AA-27
RELATIVE_DATES_FLAG = CourseWaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.relative_dates', __name__) # lint-amnesty, pylint: disable=toggle-missing-annotation
@@ -62,7 +62,7 @@ RELATIVE_DATES_FLAG = CourseWaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.relative_dates'
# that sends course assignment calendars to course students, whenever they click on the "Subscribe to calendar
# updates" button. The email contains an ics attachment that students can then use to sync with their own calendar
# apps.
# .. toggle_warnings: For this toggle to have an effect, the RELATIVE_DATES_FLAG toggle must be enabled, too.
# .. toggle_warning: For this toggle to have an effect, the RELATIVE_DATES_FLAG toggle must be enabled, too.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2021-01-26
# .. toggle_target_removal_date: 2021-04-26

View File

@@ -36,7 +36,7 @@ from common.djangoapps.track import segment
# .. toggle_creation_date: 2019-4-16
# .. toggle_target_removal_date: None
# .. toggle_tickets: REVEM-282
# .. 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.
DISCOUNT_APPLICABILITY_FLAG = WaffleFlag('discounts.enable_discounting', __name__)
DISCOUNT_APPLICABILITY_HOLDBACK = 'first_purchase_discount_holdback'

View File

@@ -17,7 +17,7 @@ WAFFLE_FLAG_NAMESPACE = 'learner_profile'
# .. toggle_use_cases: temporary, open_edx
# .. toggle_creation_date: 2019-02-19
# .. toggle_target_removal_date: 2020-12-31
# .. toggle_warnings: Also set settings.PROFILE_MICROFRONTEND_URL and site's ENABLE_PROFILE_MICROFRONTEND.
# .. toggle_warning: Also set settings.PROFILE_MICROFRONTEND_URL and site's ENABLE_PROFILE_MICROFRONTEND.
# .. toggle_tickets: DEPR-17
REDIRECT_TO_PROFILE_MICROFRONTEND = WaffleFlag(f'{WAFFLE_FLAG_NAMESPACE}.redirect_to_microfrontend', __name__)