From 8f6c416eb8fbfef8c820f39f87709019267db2ee Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Tue, 4 Jun 2024 12:04:18 +0500 Subject: [PATCH 1/9] feat: updated new relic reporting to datadog --- edx_ace/monitoring.py | 13 +++++++------ requirements/dev.txt | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/edx_ace/monitoring.py b/edx_ace/monitoring.py index 8e41d8f3..1b1de236 100644 --- a/edx_ace/monitoring.py +++ b/edx_ace/monitoring.py @@ -2,16 +2,17 @@ :mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE message delivery stats to monitoring services. """ +from edx_django_utils.monitoring import DatadogBackend try: - import newrelic.agent + import ddtrace.auto except ImportError: - newrelic = None # pylint: disable=invalid-name + ddtrace = None # pylint: disable=invalid-name def report(key, value): - report_to_newrelic(key, value) + report_to_datadog(key, value) -def report_to_newrelic(key, value): - if newrelic: - newrelic.agent.add_custom_parameter(key, value) +def report_to_datadog(key, value): + if ddtrace: + DatadogBackend().set_attribute(key, value) diff --git a/requirements/dev.txt b/requirements/dev.txt index 3802d1b6..0f1615a0 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -42,6 +42,7 @@ code-annotations==1.6.0 # via edx-lint colorama==0.4.6 # via tox +ddtrace==2.8.5 diff-cover==8.0.3 # via -r requirements/dev.in dill==0.3.8 @@ -55,6 +56,7 @@ django==4.2.11 # edx-i18n-tools docutils==0.20.1 # via readme-renderer +edx-django-utils==5.14.2 edx-i18n-tools==1.3.0 # via -r requirements/dev.in edx-lint==5.3.6 From 0665bd223823bacfb06e9b04b7f2c5bc722058ce Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Tue, 4 Jun 2024 12:30:45 +0500 Subject: [PATCH 2/9] fix: fixed requirements for test cases --- requirements/ci.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/ci.txt b/requirements/ci.txt index 127e7293..b8702fae 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,6 +12,7 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv +edx-django-utils==5.14.2 filelock==3.13.1 # via # tox From 24eeb57f34ee54a1ca6e834b56dc5aeb3336f0ae Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Tue, 4 Jun 2024 12:37:28 +0500 Subject: [PATCH 3/9] fix: fixed quality requirements tests --- requirements/quality.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements/quality.txt b/requirements/quality.txt index 30921d25..c4f7efcb 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -23,6 +23,7 @@ code-annotations==1.6.0 # via edx-lint dill==0.3.8 # via pylint +edx-django-utils==5.14.2 edx-lint==5.3.6 # via -r requirements/quality.in isort==5.13.2 From 5edd07257de7d66203d4df732eca47ab9dc97821 Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Tue, 4 Jun 2024 14:10:17 +0500 Subject: [PATCH 4/9] fix: fixed test cases --- edx_ace/monitoring.py | 2 +- requirements/base.in | 2 ++ requirements/ci.txt | 1 - requirements/dev.txt | 2 -- requirements/quality.txt | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/edx_ace/monitoring.py b/edx_ace/monitoring.py index 1b1de236..f24821c6 100644 --- a/edx_ace/monitoring.py +++ b/edx_ace/monitoring.py @@ -2,11 +2,11 @@ :mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE message delivery stats to monitoring services. """ -from edx_django_utils.monitoring import DatadogBackend try: import ddtrace.auto except ImportError: ddtrace = None # pylint: disable=invalid-name +from edx_django_utils.monitoring import DatadogBackend def report(key, value): diff --git a/requirements/base.in b/requirements/base.in index e15b53b9..6956a401 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,3 +7,5 @@ attrs>=17.2.0 # Attributes without boilerplate sailthru-client==2.2.3 six stevedore>=1.10.0 +ddtrace==2.8.5 +edx-django-utils==5.14.2 diff --git a/requirements/ci.txt b/requirements/ci.txt index b8702fae..127e7293 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,7 +12,6 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -edx-django-utils==5.14.2 filelock==3.13.1 # via # tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 0f1615a0..3802d1b6 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -42,7 +42,6 @@ code-annotations==1.6.0 # via edx-lint colorama==0.4.6 # via tox -ddtrace==2.8.5 diff-cover==8.0.3 # via -r requirements/dev.in dill==0.3.8 @@ -56,7 +55,6 @@ django==4.2.11 # edx-i18n-tools docutils==0.20.1 # via readme-renderer -edx-django-utils==5.14.2 edx-i18n-tools==1.3.0 # via -r requirements/dev.in edx-lint==5.3.6 diff --git a/requirements/quality.txt b/requirements/quality.txt index c4f7efcb..30921d25 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -23,7 +23,6 @@ code-annotations==1.6.0 # via edx-lint dill==0.3.8 # via pylint -edx-django-utils==5.14.2 edx-lint==5.3.6 # via -r requirements/quality.in isort==5.13.2 From 46acb0f16b7e15eb4e671d4d6df0d82cb55c7ad3 Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Wed, 5 Jun 2024 12:02:16 +0500 Subject: [PATCH 5/9] chore: updated in and txt requirement files --- requirements/ci.txt | 12 ++-- requirements/dev.txt | 144 +++++++++++++++++++++++++++---------- requirements/doc.txt | 108 ++++++++++++++++++++++------ requirements/pip-tools.txt | 17 ++--- requirements/pip.txt | 4 +- requirements/quality.txt | 14 ++-- requirements/test.txt | 98 +++++++++++++++++++------ 7 files changed, 292 insertions(+), 105 deletions(-) diff --git a/requirements/ci.txt b/requirements/ci.txt index 127e7293..0008d40b 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,19 +12,19 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.14.0 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox -platformdirs==4.2.0 +platformdirs==4.2.2 # via # tox # virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via tox pyproject-api==1.6.1 # via tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.14.0 +tox==4.15.0 # via -r requirements/ci.in -virtualenv==20.25.1 +virtualenv==20.26.2 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 3802d1b6..cd34c726 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,26 +4,37 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django -astroid==3.1.0 +astroid==3.2.2 # via # pylint # pylint-celery attrs==23.2.0 - # via -r requirements/base.in + # via + # -r requirements/base.in + # cattrs + # ddtrace +backports-tarfile==1.2.0 + # via jaraco-context backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt # -r requirements/dev.in # -r requirements/quality.in # django -build==1.1.1 +build==1.2.1 # via pip-tools +bytecode==0.15.1 + # via ddtrace cachetools==5.3.3 # via tox -certifi==2024.2.2 +cattrs==23.2.3 + # via ddtrace +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl chardet==5.2.0 # via # diff-cover @@ -34,60 +45,90 @@ click==8.1.7 # via # click-log # code-annotations + # edx-django-utils # edx-lint # pip-tools click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint colorama==0.4.6 # via tox -diff-cover==8.0.3 +ddsketch==3.0.1 + # via ddtrace +ddtrace==2.8.5 + # via -r requirements/base.in +deprecated==1.2.14 + # via opentelemetry-api +diff-cover==9.0.0 # via -r requirements/dev.in dill==0.3.8 # via pylint distlib==0.3.8 # via virtualenv -django==4.2.11 +django==4.2.13 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in + # django-crum + # django-waffle + # edx-django-utils # edx-i18n-tools +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils docutils==0.20.1 # via readme-renderer -edx-i18n-tools==1.3.0 +edx-django-utils==5.14.2 + # via -r requirements/base.in +edx-i18n-tools==1.6.0 # via -r requirements/dev.in edx-lint==5.3.6 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.13.1 +envier==0.5.1 + # via ddtrace +exceptiongroup==1.2.1 + # via cattrs +filelock==3.14.0 # via # tox # virtualenv -idna==3.6 +idna==3.7 # via requests -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # build # keyring + # opentelemetry-api # twine -importlib-resources==6.1.2 +importlib-resources==6.4.0 # via keyring isort==5.13.2 # via # -r requirements/quality.in # pylint -jaraco-classes==3.3.1 +jaraco-classes==3.4.0 + # via keyring +jaraco-context==5.3.0 + # via keyring +jaraco-functools==4.0.1 # via keyring -jinja2==3.1.3 +jinja2==3.1.4 # via # code-annotations # diff-cover -keyring==24.3.1 +keyring==25.2.1 # via twine -lxml==5.1.0 - # via edx-i18n-tools +lxml[html-clean,html_clean]==5.2.2 + # via + # edx-i18n-tools + # lxml-html-clean +lxml-html-clean==0.1.1 + # via lxml markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -97,43 +138,55 @@ mccabe==0.7.0 mdurl==0.1.2 # via markdown-it-py more-itertools==10.2.0 - # via jaraco-classes -nh3==0.2.15 + # via + # jaraco-classes + # jaraco-functools +newrelic==9.10.0 + # via edx-django-utils +nh3==0.2.17 # via readme-renderer -packaging==23.2 +opentelemetry-api==1.25.0 + # via ddtrace +packaging==24.0 # via # build # pyproject-api # tox -path==16.10.0 +path==16.14.0 # via edx-i18n-tools pbr==6.0.0 # via stevedore pip-tools==7.4.1 # via -r requirements/dev.in -pkginfo==1.10.0 +pkginfo==1.11.0 # via twine -platformdirs==4.2.0 +platformdirs==4.2.2 # via # pylint # tox # virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via # diff-cover # tox polib==1.2.0 # via edx-i18n-tools +protobuf==5.27.0 + # via ddtrace +psutil==5.9.8 + # via edx-django-utils pycodestyle==2.11.1 # via -r requirements/quality.in +pycparser==2.22 + # via cffi pydocstyle==6.3.0 # via -r requirements/quality.in -pygments==2.17.2 +pygments==2.18.0 # via # diff-cover # readme-renderer # rich -pylint==3.1.0 +pylint==3.2.2 # via # edx-lint # pylint-celery @@ -147,9 +200,11 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django +pynacl==1.5.0 + # via edx-django-utils pyproject-api==1.6.1 # via tox -pyproject-hooks==1.0.0 +pyproject-hooks==1.1.0 # via # build # pip-tools @@ -163,7 +218,7 @@ pyyaml==6.0.1 # edx-i18n-tools readme-renderer==43.0 # via twine -requests==2.31.0 +requests==2.32.3 # via # requests-toolbelt # sailthru-client @@ -181,16 +236,21 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in + # ddsketch + # ddtrace # edx-lint # python-dateutil snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.4.4 - # via django +sqlparse==0.5.0 + # via + # ddtrace + # django stevedore==5.2.0 # via # -r requirements/base.in # code-annotations + # edx-django-utils text-unidecode==1.3 # via python-slugify tomli==2.0.1 @@ -199,31 +259,37 @@ tomli==2.0.1 # pip-tools # pylint # pyproject-api - # pyproject-hooks # tox -tomlkit==0.12.4 +tomlkit==0.12.5 # via pylint -tox==4.14.0 +tox==4.15.0 # via -r requirements/dev.in -twine==5.0.0 +twine==5.1.0 # via -r requirements/dev.in -typing-extensions==4.10.0 +typing-extensions==4.12.1 # via # asgiref # astroid + # bytecode + # cattrs + # ddtrace # pylint # rich urllib3==2.2.1 # via # requests # twine -virtualenv==20.25.1 +virtualenv==20.26.2 # via tox -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/dev.in # pip-tools -zipp==3.17.0 +wrapt==1.16.0 + # via deprecated +xmltodict==0.13.0 + # via ddtrace +zipp==3.19.1 # via # importlib-metadata # importlib-resources diff --git a/requirements/doc.txt b/requirements/doc.txt index c299e208..a130d88e 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -8,14 +8,19 @@ accessible-pygments==0.0.4 # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via django attrs==23.2.0 - # via -r requirements/base.in -babel==2.14.0 + # via + # -r requirements/base.in + # cattrs + # ddtrace +babel==2.15.0 # via # pydata-sphinx-theme # sphinx +backports-tarfile==1.2.0 + # via jaraco-context backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt @@ -23,14 +28,35 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # django beautifulsoup4==4.12.3 # via pydata-sphinx-theme -certifi==2024.2.2 +bytecode==0.15.1 + # via ddtrace +cattrs==23.2.3 + # via ddtrace +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl charset-normalizer==3.3.2 # via requests -django==4.2.11 +click==8.1.7 + # via edx-django-utils +ddsketch==3.0.1 + # via ddtrace +ddtrace==2.8.5 + # via -r requirements/base.in +deprecated==1.2.14 + # via opentelemetry-api +django==4.2.13 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in + # django-crum + # django-waffle + # edx-django-utils +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils doc8==1.1.1 # via -r requirements/doc.in docutils==0.19 @@ -40,22 +66,34 @@ docutils==0.19 # readme-renderer # restructuredtext-lint # sphinx -idna==3.6 +edx-django-utils==5.14.2 + # via -r requirements/base.in +envier==0.5.1 + # via ddtrace +exceptiongroup==1.2.1 + # via cattrs +idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # keyring + # opentelemetry-api # sphinx # twine -importlib-resources==6.1.2 +importlib-resources==6.4.0 # via keyring -jaraco-classes==3.3.1 +jaraco-classes==3.4.0 # via keyring -jinja2==3.1.3 +jaraco-context==5.3.0 + # via keyring +jaraco-functools==4.0.1 + # via keyring +jinja2==3.1.4 # via sphinx -keyring==24.3.1 +keyring==25.2.1 # via twine markdown-it-py==3.0.0 # via rich @@ -64,20 +102,32 @@ markupsafe==2.1.5 mdurl==0.1.2 # via markdown-it-py more-itertools==10.2.0 - # via jaraco-classes -nh3==0.2.15 + # via + # jaraco-classes + # jaraco-functools +newrelic==9.10.0 + # via edx-django-utils +nh3==0.2.17 # via readme-renderer -packaging==23.2 +opentelemetry-api==1.25.0 + # via ddtrace +packaging==24.0 # via # pydata-sphinx-theme # sphinx pbr==6.0.0 # via stevedore -pkginfo==1.10.0 +pkginfo==1.11.0 # via twine +protobuf==5.27.0 + # via ddtrace +psutil==5.9.8 + # via edx-django-utils +pycparser==2.22 + # via cffi pydata-sphinx-theme==0.14.4 # via sphinx-book-theme -pygments==2.17.2 +pygments==2.18.0 # via # accessible-pygments # doc8 @@ -85,6 +135,8 @@ pygments==2.17.2 # readme-renderer # rich # sphinx +pynacl==1.5.0 + # via edx-django-utils python-dateutil==2.9.0.post0 # via -r requirements/base.in pytz==2024.1 @@ -93,7 +145,7 @@ readme-renderer==43.0 # via # -r requirements/doc.in # twine -requests==2.31.0 +requests==2.32.3 # via # requests-toolbelt # sailthru-client @@ -114,6 +166,8 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in + # ddsketch + # ddtrace # python-dateutil snowballstemmer==2.2.0 # via sphinx @@ -138,26 +192,36 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlparse==0.4.4 - # via django +sqlparse==0.5.0 + # via + # ddtrace + # django stevedore==5.2.0 # via # -r requirements/base.in # doc8 + # edx-django-utils tomli==2.0.1 # via doc8 -twine==5.0.0 +twine==5.1.0 # via -r requirements/doc.in -typing-extensions==4.10.0 +typing-extensions==4.12.1 # via # asgiref + # bytecode + # cattrs + # ddtrace # pydata-sphinx-theme # rich urllib3==2.2.1 # via # requests # twine -zipp==3.17.0 +wrapt==1.16.0 + # via deprecated +xmltodict==0.13.0 + # via ddtrace +zipp==3.19.1 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 921c5b5c..f347c8cd 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,17 +4,19 @@ # # make upgrade # -build==1.1.1 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # build +packaging==24.0 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in -pyproject-hooks==1.0.0 +pyproject-hooks==1.1.0 # via # build # pip-tools @@ -22,10 +24,9 @@ tomli==2.0.1 # via # build # pip-tools - # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.19.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 66656035..8a72bb0b 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==70.0.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 30921d25..91938f67 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,7 +4,7 @@ # # make upgrade # -astroid==3.1.0 +astroid==3.2.2 # via # pylint # pylint-celery @@ -19,7 +19,7 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint dill==0.3.8 # via pylint @@ -29,7 +29,7 @@ isort==5.13.2 # via # -r requirements/quality.in # pylint -jinja2==3.1.3 +jinja2==3.1.4 # via code-annotations markupsafe==2.1.5 # via jinja2 @@ -37,13 +37,13 @@ mccabe==0.7.0 # via pylint pbr==6.0.0 # via stevedore -platformdirs==4.2.0 +platformdirs==4.2.2 # via pylint pycodestyle==2.11.1 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==3.1.0 +pylint==3.2.2 # via # edx-lint # pylint-celery @@ -71,9 +71,9 @@ text-unidecode==1.3 # via python-slugify tomli==2.0.1 # via pylint -tomlkit==0.12.4 +tomlkit==0.12.5 # via pylint -typing-extensions==4.10.0 +typing-extensions==4.12.1 # via # astroid # pylint diff --git a/requirements/test.txt b/requirements/test.txt index c5d4b131..dcc3ebe7 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,69 +4,112 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django attrs==23.2.0 # via # -r requirements/base.in + # cattrs + # ddtrace # hypothesis backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt # -r requirements/test.in # django -certifi==2024.2.2 +bytecode==0.15.1 + # via ddtrace +cattrs==23.2.3 + # via ddtrace +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl charset-normalizer==3.3.2 # via requests -coverage[toml]==7.4.3 +click==8.1.7 + # via edx-django-utils +coverage[toml]==7.5.3 # via pytest-cov +ddsketch==3.0.1 + # via ddtrace ddt==1.7.2 # via -r requirements/test.in +ddtrace==2.8.5 + # via -r requirements/base.in +deprecated==1.2.14 + # via opentelemetry-api # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -exceptiongroup==1.2.0 + # django-crum + # django-waffle + # edx-django-utils +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils +edx-django-utils==5.14.2 + # via -r requirements/base.in +envier==0.5.1 + # via ddtrace +exceptiongroup==1.2.1 # via + # cattrs # hypothesis # pytest -hypothesis[pytz]==6.98.17 +hypothesis[pytz]==6.103.0 # via # -r requirements/test.in # hypothesis-pytest hypothesis-pytest==0.19.0 # via -r requirements/test.in -idna==3.6 +idna==3.7 # via requests -importlib-metadata==7.0.1 - # via pytest-randomly +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # opentelemetry-api + # pytest-randomly iniconfig==2.0.0 # via pytest jedi==0.19.1 # via pudb mock==5.1.0 # via -r requirements/test.in -packaging==23.2 +newrelic==9.10.0 + # via edx-django-utils +opentelemetry-api==1.25.0 + # via ddtrace +packaging==24.0 # via # pudb # pytest -parso==0.8.3 +parso==0.8.4 # via jedi pbr==6.0.0 # via stevedore -pluggy==1.4.0 +pluggy==1.5.0 # via pytest +protobuf==5.27.0 + # via ddtrace +psutil==5.9.8 + # via edx-django-utils pudb==2024.1 # via -r requirements/test.in -pygments==2.17.2 +pycparser==2.22 + # via cffi +pygments==2.18.0 # via pudb -pytest==8.0.2 +pynacl==1.5.0 + # via edx-django-utils +pytest==8.2.1 # via # hypothesis-pytest # pytest-cov # pytest-django # pytest-randomly -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.in pytest-django==4.8.0 # via -r requirements/test.in @@ -76,7 +119,7 @@ python-dateutil==2.9.0.post0 # via -r requirements/base.in pytz==2024.1 # via hypothesis -requests==2.31.0 +requests==2.32.3 # via sailthru-client sailthru-client==2.2.3 # via -r requirements/base.in @@ -85,24 +128,33 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in + # ddsketch + # ddtrace # python-dateutil sortedcontainers==2.4.0 # via hypothesis -sqlparse==0.4.4 - # via django +sqlparse==0.5.0 + # via + # ddtrace + # django stevedore==5.2.0 - # via -r requirements/base.in + # via + # -r requirements/base.in + # edx-django-utils tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.10.0 +typing-extensions==4.12.1 # via # asgiref + # bytecode + # cattrs + # ddtrace # urwid urllib3==2.2.1 # via requests -urwid==2.6.8 +urwid==2.6.12 # via # pudb # urwid-readline @@ -110,5 +162,9 @@ urwid-readline==0.14 # via pudb wcwidth==0.2.13 # via urwid -zipp==3.17.0 +wrapt==1.16.0 + # via deprecated +xmltodict==0.13.0 + # via ddtrace +zipp==3.19.1 # via importlib-metadata From feac754f2d252a8fe932cc63e779dc2c5b769a3b Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Thu, 20 Jun 2024 11:09:57 +0500 Subject: [PATCH 6/9] chore: updated version to 1.9 --- edx_ace/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edx_ace/__init__.py b/edx_ace/__init__.py index 09590995..69bd5d5c 100644 --- a/edx_ace/__init__.py +++ b/edx_ace/__init__.py @@ -13,7 +13,7 @@ from .recipient import Recipient from .recipient_resolver import RecipientResolver -__version__ = '1.8.0' +__version__ = '1.9.0' __all__ = [ From 9cdc22c751c7244a1fdb162c1bf5215aedcb428a Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Thu, 20 Jun 2024 11:12:33 +0500 Subject: [PATCH 7/9] temp: set fail_ci_if_error to false for codecov --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f6a1ce..08acb2fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,4 +39,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} flags: unittests - fail_ci_if_error: true + fail_ci_if_error: false From da977c45dfc79419d1d0c8d16aa83fd96bc2cf6c Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Thu, 27 Jun 2024 14:26:50 +0500 Subject: [PATCH 8/9] chore: set fail_ci_if_error to true --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08acb2fb..b6f6a1ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,4 +39,4 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} flags: unittests - fail_ci_if_error: false + fail_ci_if_error: true From f73e45039b56f4ffb53900383f614f73b24543fb Mon Sep 17 00:00:00 2001 From: muhammadadeeltajamul Date: Thu, 27 Jun 2024 17:25:54 +0500 Subject: [PATCH 9/9] chore: switch to edx monitoring for monitoring --- edx_ace/monitoring.py | 13 ++----- requirements/base.in | 3 +- requirements/ci.txt | 10 +++--- requirements/dev.txt | 69 ++++++++++---------------------------- requirements/doc.txt | 55 ++++++------------------------ requirements/pip-tools.txt | 4 +-- requirements/pip.txt | 4 +-- requirements/quality.txt | 6 ++-- requirements/test.txt | 53 ++++++----------------------- 9 files changed, 55 insertions(+), 162 deletions(-) diff --git a/edx_ace/monitoring.py b/edx_ace/monitoring.py index f24821c6..1ee06408 100644 --- a/edx_ace/monitoring.py +++ b/edx_ace/monitoring.py @@ -2,17 +2,8 @@ :mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE message delivery stats to monitoring services. """ -try: - import ddtrace.auto -except ImportError: - ddtrace = None # pylint: disable=invalid-name -from edx_django_utils.monitoring import DatadogBackend +from edx_django_utils.monitoring import set_custom_attribute def report(key, value): - report_to_datadog(key, value) - - -def report_to_datadog(key, value): - if ddtrace: - DatadogBackend().set_attribute(key, value) + set_custom_attribute(key, value) diff --git a/requirements/base.in b/requirements/base.in index 6956a401..70d0b0c2 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,5 +7,4 @@ attrs>=17.2.0 # Attributes without boilerplate sailthru-client==2.2.3 six stevedore>=1.10.0 -ddtrace==2.8.5 -edx-django-utils==5.14.2 +edx-django-utils>=5.14.2 diff --git a/requirements/ci.txt b/requirements/ci.txt index 0008d40b..154d9d09 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.14.0 +filelock==3.15.4 # via # tox # virtualenv -packaging==24.0 +packaging==24.1 # via # pyproject-api # tox @@ -26,13 +26,13 @@ platformdirs==4.2.2 # virtualenv pluggy==1.5.0 # via tox -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox tomli==2.0.1 # via # pyproject-api # tox -tox==4.15.0 +tox==4.15.1 # via -r requirements/ci.in -virtualenv==20.26.2 +virtualenv==20.26.3 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index cd34c726..cd1509a8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -11,10 +11,7 @@ astroid==3.2.2 # pylint # pylint-celery attrs==23.2.0 - # via - # -r requirements/base.in - # cattrs - # ddtrace + # via -r requirements/base.in backports-tarfile==1.2.0 # via jaraco-context backports-zoneinfo==0.2.1 ; python_version < "3.9" @@ -25,12 +22,8 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # django build==1.2.1 # via pip-tools -bytecode==0.15.1 - # via ddtrace cachetools==5.3.3 # via tox -cattrs==23.2.3 - # via ddtrace certifi==2024.6.2 # via requests cffi==1.16.0 @@ -54,13 +47,7 @@ code-annotations==1.8.0 # via edx-lint colorama==0.4.6 # via tox -ddsketch==3.0.1 - # via ddtrace -ddtrace==2.8.5 - # via -r requirements/base.in -deprecated==1.2.14 - # via opentelemetry-api -diff-cover==9.0.0 +diff-cover==9.1.0 # via -r requirements/dev.in dill==0.3.8 # via pylint @@ -88,11 +75,7 @@ edx-lint==5.3.6 # via # -r requirements/dev.in # -r requirements/quality.in -envier==0.5.1 - # via ddtrace -exceptiongroup==1.2.1 - # via cattrs -filelock==3.14.0 +filelock==3.15.4 # via # tox # virtualenv @@ -103,7 +86,6 @@ importlib-metadata==6.11.0 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # build # keyring - # opentelemetry-api # twine importlib-resources==6.4.0 # via keyring @@ -137,17 +119,15 @@ mccabe==0.7.0 # via pylint mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 +more-itertools==10.3.0 # via # jaraco-classes # jaraco-functools -newrelic==9.10.0 +newrelic==9.11.0 # via edx-django-utils nh3==0.2.17 # via readme-renderer -opentelemetry-api==1.25.0 - # via ddtrace -packaging==24.0 +packaging==24.1 # via # build # pyproject-api @@ -158,7 +138,7 @@ pbr==6.0.0 # via stevedore pip-tools==7.4.1 # via -r requirements/dev.in -pkginfo==1.11.0 +pkginfo==1.10.0 # via twine platformdirs==4.2.2 # via @@ -171,11 +151,9 @@ pluggy==1.5.0 # tox polib==1.2.0 # via edx-i18n-tools -protobuf==5.27.0 - # via ddtrace -psutil==5.9.8 +psutil==6.0.0 # via edx-django-utils -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/quality.in pycparser==2.22 # via cffi @@ -186,7 +164,7 @@ pygments==2.18.0 # diff-cover # readme-renderer # rich -pylint==3.2.2 +pylint==3.2.4 # via # edx-lint # pylint-celery @@ -202,7 +180,7 @@ pylint-plugin-utils==0.8.2 # pylint-django pynacl==1.5.0 # via edx-django-utils -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox pyproject-hooks==1.1.0 # via @@ -236,16 +214,12 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in - # ddsketch - # ddtrace # edx-lint # python-dateutil snowballstemmer==2.2.0 # via pydocstyle sqlparse==0.5.0 - # via - # ddtrace - # django + # via django stevedore==5.2.0 # via # -r requirements/base.in @@ -262,34 +236,27 @@ tomli==2.0.1 # tox tomlkit==0.12.5 # via pylint -tox==4.15.0 +tox==4.15.1 # via -r requirements/dev.in -twine==5.1.0 +twine==5.1.1 # via -r requirements/dev.in -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # asgiref # astroid - # bytecode - # cattrs - # ddtrace # pylint # rich -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine -virtualenv==20.26.2 +virtualenv==20.26.3 # via tox wheel==0.43.0 # via # -r requirements/dev.in # pip-tools -wrapt==1.16.0 - # via deprecated -xmltodict==0.13.0 - # via ddtrace -zipp==3.19.1 +zipp==3.19.2 # via # importlib-metadata # importlib-resources diff --git a/requirements/doc.txt b/requirements/doc.txt index a130d88e..c87fc798 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -11,10 +11,7 @@ alabaster==0.7.13 asgiref==3.8.1 # via django attrs==23.2.0 - # via - # -r requirements/base.in - # cattrs - # ddtrace + # via -r requirements/base.in babel==2.15.0 # via # pydata-sphinx-theme @@ -28,10 +25,6 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # django beautifulsoup4==4.12.3 # via pydata-sphinx-theme -bytecode==0.15.1 - # via ddtrace -cattrs==23.2.3 - # via ddtrace certifi==2024.6.2 # via requests cffi==1.16.0 @@ -40,12 +33,6 @@ charset-normalizer==3.3.2 # via requests click==8.1.7 # via edx-django-utils -ddsketch==3.0.1 - # via ddtrace -ddtrace==2.8.5 - # via -r requirements/base.in -deprecated==1.2.14 - # via opentelemetry-api django==4.2.13 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt @@ -68,10 +55,6 @@ docutils==0.19 # sphinx edx-django-utils==5.14.2 # via -r requirements/base.in -envier==0.5.1 - # via ddtrace -exceptiongroup==1.2.1 - # via cattrs idna==3.7 # via requests imagesize==1.4.1 @@ -80,7 +63,6 @@ importlib-metadata==6.11.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # keyring - # opentelemetry-api # sphinx # twine importlib-resources==6.4.0 @@ -101,27 +83,23 @@ markupsafe==2.1.5 # via jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 +more-itertools==10.3.0 # via # jaraco-classes # jaraco-functools -newrelic==9.10.0 +newrelic==9.11.0 # via edx-django-utils nh3==0.2.17 # via readme-renderer -opentelemetry-api==1.25.0 - # via ddtrace -packaging==24.0 +packaging==24.1 # via # pydata-sphinx-theme # sphinx pbr==6.0.0 # via stevedore -pkginfo==1.11.0 +pkginfo==1.10.0 # via twine -protobuf==5.27.0 - # via ddtrace -psutil==5.9.8 +psutil==6.0.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -166,8 +144,6 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in - # ddsketch - # ddtrace # python-dateutil snowballstemmer==2.2.0 # via sphinx @@ -193,9 +169,7 @@ sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 # via sphinx sqlparse==0.5.0 - # via - # ddtrace - # django + # via django stevedore==5.2.0 # via # -r requirements/base.in @@ -203,25 +177,18 @@ stevedore==5.2.0 # edx-django-utils tomli==2.0.1 # via doc8 -twine==5.1.0 +twine==5.1.1 # via -r requirements/doc.in -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # asgiref - # bytecode - # cattrs - # ddtrace # pydata-sphinx-theme # rich -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine -wrapt==1.16.0 - # via deprecated -xmltodict==0.13.0 - # via ddtrace -zipp==3.19.1 +zipp==3.19.2 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index f347c8cd..30588308 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -12,7 +12,7 @@ importlib-metadata==6.11.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # build -packaging==24.0 +packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in @@ -26,7 +26,7 @@ tomli==2.0.1 # pip-tools wheel==0.43.0 # via pip-tools -zipp==3.19.1 +zipp==3.19.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 8a72bb0b..7be83186 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -8,7 +8,7 @@ wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.0 +pip==24.1.1 # via -r requirements/pip.in -setuptools==70.0.0 +setuptools==70.1.1 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 91938f67..87c76b0c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -39,11 +39,11 @@ pbr==6.0.0 # via stevedore platformdirs==4.2.2 # via pylint -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==3.2.2 +pylint==3.2.4 # via # edx-lint # pylint-celery @@ -73,7 +73,7 @@ tomli==2.0.1 # via pylint tomlkit==0.12.5 # via pylint -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # astroid # pylint diff --git a/requirements/test.txt b/requirements/test.txt index dcc3ebe7..85106676 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -9,18 +9,12 @@ asgiref==3.8.1 attrs==23.2.0 # via # -r requirements/base.in - # cattrs - # ddtrace # hypothesis backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt # -r requirements/test.in # django -bytecode==0.15.1 - # via ddtrace -cattrs==23.2.3 - # via ddtrace certifi==2024.6.2 # via requests cffi==1.16.0 @@ -29,16 +23,10 @@ charset-normalizer==3.3.2 # via requests click==8.1.7 # via edx-django-utils -coverage[toml]==7.5.3 +coverage[toml]==7.5.4 # via pytest-cov -ddsketch==3.0.1 - # via ddtrace ddt==1.7.2 # via -r requirements/test.in -ddtrace==2.8.5 - # via -r requirements/base.in -deprecated==1.2.14 - # via opentelemetry-api # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -51,14 +39,11 @@ django-waffle==4.1.0 # via edx-django-utils edx-django-utils==5.14.2 # via -r requirements/base.in -envier==0.5.1 - # via ddtrace exceptiongroup==1.2.1 # via - # cattrs # hypothesis # pytest -hypothesis[pytz]==6.103.0 +hypothesis[pytz]==6.104.1 # via # -r requirements/test.in # hypothesis-pytest @@ -69,7 +54,6 @@ idna==3.7 importlib-metadata==6.11.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # opentelemetry-api # pytest-randomly iniconfig==2.0.0 # via pytest @@ -77,11 +61,9 @@ jedi==0.19.1 # via pudb mock==5.1.0 # via -r requirements/test.in -newrelic==9.10.0 +newrelic==9.11.0 # via edx-django-utils -opentelemetry-api==1.25.0 - # via ddtrace -packaging==24.0 +packaging==24.1 # via # pudb # pytest @@ -91,9 +73,7 @@ pbr==6.0.0 # via stevedore pluggy==1.5.0 # via pytest -protobuf==5.27.0 - # via ddtrace -psutil==5.9.8 +psutil==6.0.0 # via edx-django-utils pudb==2024.1 # via -r requirements/test.in @@ -103,7 +83,7 @@ pygments==2.18.0 # via pudb pynacl==1.5.0 # via edx-django-utils -pytest==8.2.1 +pytest==8.2.2 # via # hypothesis-pytest # pytest-cov @@ -128,15 +108,11 @@ simplejson==3.19.2 six==1.16.0 # via # -r requirements/base.in - # ddsketch - # ddtrace # python-dateutil sortedcontainers==2.4.0 # via hypothesis sqlparse==0.5.0 - # via - # ddtrace - # django + # via django stevedore==5.2.0 # via # -r requirements/base.in @@ -145,16 +121,13 @@ tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.12.1 +typing-extensions==4.12.2 # via # asgiref - # bytecode - # cattrs - # ddtrace # urwid -urllib3==2.2.1 +urllib3==2.2.2 # via requests -urwid==2.6.12 +urwid==2.6.14 # via # pudb # urwid-readline @@ -162,9 +135,5 @@ urwid-readline==0.14 # via pudb wcwidth==0.2.13 # via urwid -wrapt==1.16.0 - # via deprecated -xmltodict==0.13.0 - # via ddtrace -zipp==3.19.1 +zipp==3.19.2 # via importlib-metadata