From 2517def54ad584525206561e37ddc44ce91262a8 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) (cherry picked from commit 46888e874d655d1076be04d68a42c621faae8ad6) --- 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 7d8f1431f805..a9240169d12f 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -222,6 +222,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 97e907c1ac0c..a9e1e7b57f73 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 3719b218a0a5..bba6b94f47d0 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -57,8 +57,9 @@ networkx<2.6 # 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 4ed2a7d886c1..7f3aa2b62ce9 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -764,9 +764,8 @@ pylatexenc==2.10 # via olxcleaner pylti1p3==1.9.1 # 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 d627f5e94775..80865ef4894f 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -1068,9 +1068,8 @@ pylint-pytest==0.3.0 # via -r requirements/edx/testing.txt pylti1p3==1.9.1 # 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 0946de67ea11..f1fc70b7e950 100644 --- a/requirements/edx/paver.txt +++ b/requirements/edx/paver.txt @@ -28,7 +28,7 @@ pbr==5.6.0 # via stevedore psutil==5.8.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 1d1f8bb7d50f..f8d71324a951 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -1000,9 +1000,8 @@ pylint-pytest==0.3.0 # via -r requirements/edx/testing.in pylti1p3==1.9.1 # 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