From 46888e874d655d1076be04d68a42c621faae8ad6 Mon Sep 17 00:00:00 2001 From: Mohammad Ahtasham ul Hassan <60315450+aht007@users.noreply.github.com> Date: Fri, 1 Jul 2022 09:04:55 +0100 Subject: [PATCH] chore: unpin pymongo (#30657) --- cms/envs/devstack.py | 11 +++++++++++ lms/envs/devstack.py | 12 ++++++++++++ requirements/constraints.txt | 5 +++-- requirements/edx/base.txt | 3 +-- requirements/edx/development.txt | 3 +-- requirements/edx/paver.txt | 2 +- requirements/edx/testing.txt | 3 +-- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 76af9a6cd2d9..737af72ce471 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -228,6 +228,17 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing OPENAPI_CACHE_TIMEOUT = 0 +##################################################################### +# set replica set of contentstore to none as we haven't setup any for cms in devstack +CONTENTSTORE['DOC_STORE_CONFIG']['replicaSet'] = None + +##################################################################### +# set replica sets of moduelstore to none as we haven't setup any for cms in devstack +for store in MODULESTORE['default']['OPTIONS']['stores']: + if 'DOC_STORE_CONFIG' in store and 'replicaSet' in store['DOC_STORE_CONFIG']: + store['DOC_STORE_CONFIG']['replicaSet'] = None + + ##################################################################### # Lastly, run any migrations, if needed. MODULESTORE = convert_module_store_setting_if_needed(MODULESTORE) diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 133d3cf1e3ba..8ddbb96ff138 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -323,10 +323,22 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing OPENAPI_CACHE_TIMEOUT = 0 +##################################################################### +# set replica set of contentstore to none as we haven't setup any for lms in devstack +CONTENTSTORE['DOC_STORE_CONFIG']['replicaSet'] = None + +##################################################################### +# set replica sets of moduelstore to none as we haven't setup any for lms in devstack +for store in MODULESTORE['default']['OPTIONS']['stores']: + if 'DOC_STORE_CONFIG' in store and 'replicaSet' in store['DOC_STORE_CONFIG']: + store['DOC_STORE_CONFIG']['replicaSet'] = None + + ##################################################################### # Lastly, run any migrations, if needed. MODULESTORE = convert_module_store_setting_if_needed(MODULESTORE) + SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' EDXNOTES_INTERNAL_API = 'http://edx.devstack.edxnotesapi:18120/api/v1' diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 877103718256..04e2cdfaeaa6 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -49,8 +49,9 @@ matplotlib<3.4.0 # Constraint from astroid 2.3.3 wrapt==1.11.* -# tests failing for pymongo==3.11 -pymongo<3.11 +# constrained in opaque_keys. migration guide here: https://pymongo.readthedocs.io/en/4.0/migrate-to-pymongo4.html +# Major upgrade will be done in separate ticket. +pymongo<4.0.0 # sympy latest version causing test failures. # may be related to python35 version drop in 1.7.0. Needs to be tested before removing. diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index f8050f102899..040674737080 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -822,9 +822,8 @@ pylatexenc==2.10 # via olxcleaner pylti1p3==1.10.0 # via -r requirements/edx/base.in -pymongo==3.10.1 +pymongo==3.12.3 # via - # -c requirements/edx/../constraints.txt # -r requirements/edx/base.in # -r requirements/edx/paver.txt # edx-opaque-keys diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 715e378be0a9..890b081029a8 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -1139,9 +1139,8 @@ pylint-pytest==0.3.0 # via -r requirements/edx/testing.txt pylti1p3==1.10.0 # via -r requirements/edx/testing.txt -pymongo==3.10.1 +pymongo==3.12.3 # via - # -c requirements/edx/../constraints.txt # -r requirements/edx/testing.txt # edx-opaque-keys # event-tracking diff --git a/requirements/edx/paver.txt b/requirements/edx/paver.txt index a4dc0f77bd25..e750e9f7acb5 100644 --- a/requirements/edx/paver.txt +++ b/requirements/edx/paver.txt @@ -28,7 +28,7 @@ pbr==5.8.1 # via stevedore psutil==5.9.0 # via -r requirements/edx/paver.in -pymongo==3.10.1 +pymongo==3.12.3 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/paver.in diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index d531db258e52..ce25970cb413 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -1068,9 +1068,8 @@ pylint-pytest==0.3.0 # via -r requirements/edx/testing.in pylti1p3==1.10.0 # via -r requirements/edx/base.txt -pymongo==3.10.1 +pymongo==3.12.3 # via - # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # edx-opaque-keys # event-tracking