- Jun 10, 2019
-
-
Ned Batchelder authored
-
Ned Batchelder authored
-
Ned Batchelder authored
The rate limiter counts requests in a 5-minute window. To be sure we aren't hitting edge cases, make the future requests 6 minutes plus 1 second in the future.
-
Ned Batchelder authored
The error in the test was: ``` AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. ``` The (controversial) incompatible change was in 3.7.4: https://github.com/encode/django-rest-framework/pull/5618 I'll look into whether there's another way to address it. <details> <summary>Full error report</summary> ``` AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. Stacktrace self = <lms.djangoapps.discussion_api.tests.test_views.CommentViewSetListTest testMethod=test_profile_image_request_for_null_endorsed_by> def test_profile_image_request_for_null_endorsed_by(self): """ Tests if 'endorsed' is True but 'endorsed_by' is null, the api does not crash. This is the case for some old/stale data in prod/stage environments. """ self.register_get_user_response(self.user) thread = self.make_minimal_cs_thread({ "thread_type": "question", "endorsed_responses": [make_minimal_cs_comment({ "id": "endorsed_comment", "user_id": self.user.id, "username": self.user.username, "endorsed": True, })], "non_endorsed_resp_total": 0, }) self.register_get_thread_response(thread) self.create_profile_image(self.user, get_profile_image_storage()) response = self.client.get(self.url, { "thread_id": thread["id"], "endorsed": True, > "requested_fields": "profile_image", }) lms/djangoapps/discussion_api/tests/test_views.py:1446: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:291: in get response = super(APIClient, self).get(path, data=data, **extra) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:208: in get return self.generic('GET', path, **r) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:237: in generic method, path, data, content_type, secure, **extra) ../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:416: in generic return self.request(**r) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:288: in request return super(APIClient, self).request(**kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:240: in request request = super(APIRequestFactory, self).request(**kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:501: in request six.reraise(*exc_info) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py:41: in inner response = get_response(request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:249: in _legacy_get_response response = self._get_response(request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:187: in _get_response response = self.process_exception_by_middleware(e, request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:185: in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py:185: in inner return func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view return view_func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view return self.dispatch(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:494: in dispatch response = self.handle_exception(exc) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:491: in dispatch response = handler(request, *args, **kwargs) lms/djangoapps/discussion_api/views.py:505: in list form.cleaned_data["requested_fields"], lms/djangoapps/discussion_api/api.py:659: in get_comment_list results = _serialize_discussion_entities(request, context, responses, requested_fields, DiscussionEntity.comment) lms/djangoapps/discussion_api/api.py:468: in _serialize_discussion_entities request, results, usernames, discussion_entity_type, include_profile_image lms/djangoapps/discussion_api/api.py:413: in _add_additional_response_fields username_profile_dict = _get_user_profile_dict(request, usernames=','.join(usernames)) lms/djangoapps/discussion_api/api.py:350: in _get_user_profile_dict user_profile_details = AccountViewSet.as_view({'get': 'list'})(request).data ../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view return view_func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view return self.dispatch(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:477: in dispatch request = self.initialize_request(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:118: in initialize_request request = super(ViewSetMixin, self).initialize_request(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:381: in initialize_request parser_context=parser_context _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <rest_framework.request.Request object at 0x7f597c773890> request = <rest_framework.request.Request object at 0x7f597fa20f90> parsers = [<openedx.core.lib.api.parsers.MergePatchParser object at 0x7f59810c32d0>] authenticators = [<edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication object at 0x7f597c713690>, <openedx.core.lib...rest_framework_extensions.auth.session.authentication.SessionAuthenticationAllowInactiveUser object at 0x7f597c773390>] negotiator = <rest_framework.negotiation.DefaultContentNegotiation object at 0x7f597fa20410> parser_context = {'args': (), 'kwargs': {}, 'view': <openedx.core.djangoapps.user_api.accounts.views.AccountViewSet object at 0x7f597c7846d0>} def __init__(self, request, parsers=None, authenticators=None, negotiator=None, parser_context=None): assert isinstance(request, HttpRequest), ( 'The `request` argument must be an instance of ' '`django.http.HttpRequest`, not `{}.{}`.' > .format(request.__class__.__module__, request.__class__.__name__) ) E AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/request.py:159: AssertionError ``` </details>
-
Ned Batchelder authored
-
Ned Batchelder authored
-
Ned Batchelder authored
-
Ned Batchelder authored
In production, we use UTC as the time zone. DRF 3.7.7 now puts all times in the currently set timezone where it used to use UTC. By setting TIME_ZONE to UTC, we keep the same results we used to get. In a few places, we had to change the expected test results to be UTC.
-
Ned Batchelder authored
Because we added drf-yasg and pinned djangorestframework
-
Ned Batchelder authored
* Install drf-yasg * Add drf-yasg settings and urls * Pin drf to make drf-yasg work * Adjust config-models version to be compatible * Remove django-rest-swagger (the old way)
-
Andytr1 authored
Adding simple history to track grade changes. Educator-4347
-
Andytr1 authored
Potential fix for review rules - EDUCATOR-4262
-
Brittney Exline authored
Unpin edx-enterprise and edx-drf-extensions
-
atesker authored
-
Dave St.Germain authored
-
Feanil Patel authored
Add a script requirements file to upgrade automation.
-
atesker authored
-
atesker authored
-
- Jun 08, 2019
-
-
David Ormsbee authored
Python Requirements Update
-
edX requirements bot authored
-
- Jun 07, 2019
-
-
David Ormsbee authored
Change button text for creating account
-
atesker authored
added migration Adding simple history to track grade changes. Educator-4347 Adding migration file Adding simple history to track grade changes. Educator-4347 Adding migration file Adding simple history to track grade changes. Educator-4347 Adding migration file Re-adding lms.djangoapps reference to see if it will fix the build issues Re-adding lms.djangoapps reference to see if it will fix the build issues
-
Farhanah Sheets authored
Add in messaging for 403 errors on about pages & update error color for a11y
-
Feanil Patel authored
The xblock counting script had a requirements file that was not previously being tracked and had an out of date version of requests. Add it to the `upgrade` make target so that it stays up to date.
-
Feanil Patel authored
Update dependency @edx/edx-bootstrap to v1.0.4
-
Brittney Exline authored
-
Feanil Patel authored
The output that renovate generates is different from what the version of npm we're using generates.
-
Renovate Bot authored
-
Feanil Patel authored
Version 2.1.1 on NPM is not exactly the thing we use.
-
Matthew Piatetsky authored
add discount banner to track selection and discount price to upgrade button
-
Feanil Patel authored
Update dependency moment to v2.19.3 [SECURITY]
-
Farhanah Sheets authored
-
Feanil Patel authored
It looks like the package maintainers had a v2.1.1 that was on github but then released a different 2.1.1 to NPM. When renovate(upgrade automation) tries to make any changes, it updates the lockfile to point to the NPM one which currently breaks tests. Pinning to the correct version in the package.json so that we can get other things upgraded.
-
Feanil Patel authored
- Moved jasmin-jquery back to pointing at git. The version on NPM is not the same because they made more changes to 2.1.1 before releasing it to NPM. - Run `npm install` locally because it produces slightly different output than renovate which causes the quality tests to fail.
-
edX requirements bot authored
-
Feanil Patel authored
Update dependency react-dom to v16.1.2 [SECURITY]
-
Thomas Tracy authored
* Add IdentityServer3 Backend This adds a backend for users who want to use IdentityServer3 as their SSO provider. It can be used with the OAuth2ProviderConfig in django admin to point to an external provider.
-
- Jun 06, 2019
-
-
David Ormsbee authored
BB-1132 Decrease NAME_MIN_LENGTH to 1.
-
Josue Balandrano Coronel authored
-
Feanil Patel authored
Catch other changes to the lock file that should have been made.
-