Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove the registration.enable_failure_logging temporary Waffle… #32977

Merged
merged 12 commits into from
Aug 22, 2023
13 changes: 0 additions & 13 deletions openedx/core/djangoapps/user_authn/views/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from django.views.decorators.debug import sensitive_post_parameters
from django_countries import countries
from edx_django_utils.monitoring import set_custom_attribute
from edx_toggles.toggles import WaffleFlag
from openedx_events.learning.data import UserData, UserPersonalData
from openedx_events.learning.signals import STUDENT_REGISTRATION_COMPLETED
from openedx_filters.learning.filters import StudentRegistrationRequested
Expand Down Expand Up @@ -108,15 +107,6 @@
REGISTER_USER = Signal()


# .. toggle_name: registration.enable_failure_logging
# .. toggle_implementation: WaffleFlag
# .. toggle_default: False
# .. toggle_description: Enable verbose logging of registration failure messages
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2020-04-30
# .. toggle_target_removal_date: 2020-06-01
# .. 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'


Expand Down Expand Up @@ -709,9 +699,6 @@ def _create_response(self, request, response_dict, status_code, redirect_url=Non
return JsonResponse(response_dict, status=status_code)

def _log_validation_errors(self, request, errors, status_code):
if not REGISTRATION_FAILURE_LOGGING_FLAG.is_enabled():
return

try:
for field_key, errors in errors.items(): # lint-amnesty, pylint: disable=redefined-argument-from-local
for error in errors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from testfixtures import LogCapture
from openedx_events.tests.utils import OpenEdxEventsTestMixin

from edx_toggles.toggles.testutils import override_waffle_flag
from openedx.core.djangoapps.site_configuration.helpers import get_value
from openedx.core.djangoapps.site_configuration.tests.test_util import with_site_configuration
from openedx.core.djangoapps.user_api.accounts import (
Expand Down Expand Up @@ -49,7 +48,6 @@
from openedx.core.djangoapps.user_api.tests.test_constants import SORTED_COUNTRIES
from openedx.core.djangoapps.user_api.tests.test_helpers import TestCaseForm
from openedx.core.djangoapps.user_api.tests.test_views import UserAPITestCase
from openedx.core.djangoapps.user_authn.views.register import REGISTRATION_FAILURE_LOGGING_FLAG
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms
from openedx.core.lib.api import test_utils
from common.djangoapps.student.helpers import authenticate_new_user
Expand Down Expand Up @@ -296,7 +294,6 @@ def test_register_fullname_url_validation_error(self):
}
)

@override_waffle_flag(REGISTRATION_FAILURE_LOGGING_FLAG, True)
def test_registration_failure_logging(self):
# Register a user
response = self.client.post(self.url, {
Expand Down
Loading