Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2023.04.1 #1349

Merged
merged 14 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion appcontainer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Django==4.1.7
django-csp==3.7
eligibility-api==2023.01.1
requests==2.28.2
sentry-sdk==1.17.0
sentry-sdk==1.18.0
six==1.16.0
2 changes: 1 addition & 1 deletion benefits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "2023.03.2"
__version__ = "2023.04.1"

VERSION = __version__
19 changes: 16 additions & 3 deletions benefits/sentry.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from benefits import VERSION
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
import shutil
import os
import subprocess

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.scrubber import EventScrubber, DEFAULT_DENYLIST

from benefits import VERSION


SENTRY_ENVIRONMENT = os.environ.get("SENTRY_ENVIRONMENT", "local")

Expand Down Expand Up @@ -52,6 +55,12 @@ def get_release() -> str:
return VERSION


def get_denylist():
# custom denylist
denylist = DEFAULT_DENYLIST + ["sub", "name"]
return denylist


def configure():
SENTRY_DSN = os.environ.get("SENTRY_DSN")
if SENTRY_DSN:
Expand All @@ -68,6 +77,10 @@ def configure():
environment=SENTRY_ENVIRONMENT,
release=release,
in_app_include=["benefits"],
# send_default_pii must be False (the default) for a custom EventScrubber/denylist
# https://docs.sentry.io/platforms/python/data-management/sensitive-data/#event_scrubber
send_default_pii=False,
event_scrubber=EventScrubber(denylist=get_denylist()),
)
else:
print("SENTRY_DSN not set, so won't send events")
12 changes: 10 additions & 2 deletions benefits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ def _filter_empty(ls):
# Configuration for requests
# https://requests.readthedocs.io/en/latest/user/advanced/#timeouts

REQUESTS_CONNECT_TIMEOUT = os.environ.get("REQUESTS_CONNECT_TIMEOUT", 3)
REQUESTS_READ_TIMEOUT = os.environ.get("REQUESTS_READ_TIMEOUT", 1)
try:
REQUESTS_CONNECT_TIMEOUT = int(os.environ.get("REQUESTS_CONNECT_TIMEOUT"))
except Exception:
REQUESTS_CONNECT_TIMEOUT = 3

try:
REQUESTS_READ_TIMEOUT = int(os.environ.get("REQUESTS_READ_TIMEOUT"))
except Exception:
REQUESTS_READ_TIMEOUT = 20

REQUESTS_TIMEOUT = (REQUESTS_CONNECT_TIMEOUT, REQUESTS_READ_TIMEOUT)
14 changes: 7 additions & 7 deletions tests/cypress/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"license": "AGPL-3.0-or-later",
"private": true,
"devDependencies": {
"cypress": "^12.8.1"
"cypress": "^12.9.0"
}
}