From 1af7b290eb16c80186a870e85e08d415cc91a0dd Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Thu, 27 Jun 2024 10:46:59 -0700 Subject: [PATCH] Revert "ref(metrics): Add metrics for script run times (#72223)" This reverts commit 09cdabf95781c69013f4dfddf4d1ef5d55f15b0e. --- requirements-dev-frozen.txt | 2 +- requirements-dev.txt | 2 +- scripts/do.sh | 11 ----------- scripts/lib.sh | 15 --------------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/requirements-dev-frozen.txt b/requirements-dev-frozen.txt index 7c77c9ef5181a2..960cb64205d4aa 100644 --- a/requirements-dev-frozen.txt +++ b/requirements-dev-frozen.txt @@ -178,7 +178,7 @@ rsa==4.8 s3transfer==0.10.0 selenium==4.16.0 sentry-arroyo==2.16.5 -sentry-cli==2.32.0 +sentry-cli==2.16.0 sentry-devenv==1.6.2 sentry-forked-django-stubs==5.0.2.post4 sentry-forked-djangorestframework-stubs==3.15.0.post1 diff --git a/requirements-dev.txt b/requirements-dev.txt index b016ae34d55fad..2d748c877a8930 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -18,7 +18,7 @@ pytest-sentry>=0.3.0 pytest-xdist>=3 responses>=0.23.1 selenium>=4.16.0 -sentry-cli>=2.32.0 +sentry-cli>=2.16.0 # pre-commit dependencies pre-commit>=3.3 diff --git a/scripts/do.sh b/scripts/do.sh index bf00a79867ae5d..693f87e2d2579e 100755 --- a/scripts/do.sh +++ b/scripts/do.sh @@ -13,15 +13,4 @@ source "${HERE}/lib.sh" # a venv can avoid enabling this by setting SENTRY_NO_VENV_CHECK [ -z "${SENTRY_NO_VENV_CHECK+x}" ] && eval "${HERE}/ensure-venv.sh" # If you call this script -start=`date +%s` "$@" -end=`date +%s` -duration=$(($end-$start)) - -# If we're not in CI, send a metric of the script's execution time -if [ -z "${CI+x}" ]; then - configure-sentry-cli - # DSN for `sentry-devservices` project in the Sentry SDKs org. Used as authentication for sentry-cli. - export SENTRY_DSN=https://8ae521d2441786bb405b3b3705bb9dc1@o447951.ingest.us.sentry.io/4507346183716864 - "${venv_name}"/bin/sentry-cli send-metric distribution -n script_execution_time -v $duration -u second -t script:$1 -fi diff --git a/scripts/lib.sh b/scripts/lib.sh index cd519ae3f0b914..84642c743b00ec 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -34,21 +34,6 @@ require() { command -v "$1" >/dev/null 2>&1 } -configure-sentry-cli() { - if [ -f "${venv_name}/bin/sentry-cli" ]; then - return 0 - elif [ -f "${venv_name}/bin/pip" ]; then - pip-install sentry-cli - else - cat <&1 | awk '{print $2}') if [[ -n "${SENTRY_PYTHON_VERSION:-}" ]]; then