From d6453201f44a3a32e5492722cc5ffb667baeab39 Mon Sep 17 00:00:00 2001 From: Marc Vilanova <39573146+mvilanova@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:45:26 -0700 Subject: [PATCH 1/5] Do not fail to process all case close reminders if one fails (#3847) --- src/dispatch/case/scheduled.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/dispatch/case/scheduled.py b/src/dispatch/case/scheduled.py index e3f419cc5265..9b697bb5b689 100644 --- a/src/dispatch/case/scheduled.py +++ b/src/dispatch/case/scheduled.py @@ -1,3 +1,5 @@ +import logging + from datetime import datetime, date from schedule import every @@ -13,6 +15,9 @@ ) +log = logging.getLogger(__name__) + + @scheduler.add(every(1).day.at("18:00"), name="case-close-reminder") @timer @scheduled_project_task @@ -23,12 +28,16 @@ def case_close_reminder(db_session: SessionLocal, project: Project): ) for case in cases: - span = datetime.utcnow() - case.triage_at - q, r = divmod(span.days, 7) - if q >= 1 and date.today().isoweekday() == 1: - # we only send the reminder for cases that have been triaging - # longer than a week and only on Mondays - send_case_close_reminder(case, db_session) + try: + span = datetime.utcnow() - case.triage_at + q, r = divmod(span.days, 7) + if q >= 1 and date.today().isoweekday() == 1: + # we only send the reminder for cases that have been triaging + # longer than a week and only on Mondays + send_case_close_reminder(case, db_session) + except Exception as e: + # if one fails we don't want all to fail + log.exception(e) @scheduler.add(every(1).day.at("18:00"), name="case-triage-reminder") From 5d09c890e3f29c71ed896d0b1ab34237fa32de11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:37:19 -0700 Subject: [PATCH 2/5] Bump slack-sdk from 3.22.0 to 3.23.0 (#3841) Bumps [slack-sdk](https://github.com/slackapi/python-slack-sdk) from 3.22.0 to 3.23.0. - [Release notes](https://github.com/slackapi/python-slack-sdk/releases) - [Changelog](https://github.com/slackapi/python-slack-sdk/blob/main/docs-v2/changelog.html) - [Commits](https://github.com/slackapi/python-slack-sdk/compare/v3.22.0...v3.23.0) --- updated-dependencies: - dependency-name: slack-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-base.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index c6599d9ec3fa..1607434087c8 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -39,6 +39,12 @@ blis==0.7.10 # via thinc blockkit==1.5.2 # via -r requirements-base.in +boto3==1.28.59 + # via -r requirements-base.in +botocore==1.31.59 + # via + # boto3 + # s3transfer cachetools==5.3.1 # via # -r requirements-base.in @@ -180,6 +186,10 @@ jinja2==3.1.2 # spacy jira==2.0.0 # via -r requirements-base.in +jmespath==1.0.1 + # via + # boto3 + # botocore joblib==1.3.2 # via -r requirements-base.in jsonpath-ng==1.6.0 @@ -315,6 +325,7 @@ pytest-subtests==0.7.0 python-dateutil==2.8.2 # via # -r requirements-base.in + # botocore # emails # pandas python-jose==3.3.0 @@ -358,6 +369,8 @@ rsa==4.9 # google-auth # oauth2client # python-jose +s3transfer==0.7.0 + # via boto3 schedule==1.2.1 # via -r requirements-base.in schemathesis==3.19.7 @@ -388,7 +401,7 @@ six==1.16.0 # validators slack-bolt==1.18.0 # via -r requirements-base.in -slack-sdk==3.22.0 +slack-sdk==3.23.0 # via # -r requirements-base.in # slack-bolt @@ -469,6 +482,7 @@ uritemplate==4.1.1 # via google-api-python-client urllib3==1.26.16 # via + # botocore # google-auth # pdpyras # requests From 2d4df8e15ef9f98b8e379e20d2eb2d8509c7df0c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:37:27 -0700 Subject: [PATCH 3/5] Bump duo-client from 5.0.1 to 5.1.0 (#3840) Bumps [duo-client](https://github.com/duosecurity/duo_client_python) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/duosecurity/duo_client_python/releases) - [Commits](https://github.com/duosecurity/duo_client_python/compare/5.0.1...5.1.0) --- updated-dependencies: - dependency-name: duo-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-base.txt b/requirements-base.txt index 1607434087c8..8adb6256666f 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -112,7 +112,7 @@ deprecation==2.1.0 # via pdpyras dnspython==2.4.2 # via email-validator -duo-client==5.0.1 +duo-client==5.1.0 # via -r requirements-base.in ecdsa==0.18.0 # via python-jose From 09103916976300a3c85c623f5fceeb2c48737fb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:37:35 -0700 Subject: [PATCH 4/5] Bump ruff from 0.0.291 to 0.0.292 (#3833) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.291 to 0.0.292. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.0.291...v0.0.292) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e348450adb31..e1ca9097f6a6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -90,7 +90,7 @@ python-dateutil==2.8.2 # via faker pyyaml==6.0.1 # via pre-commit -ruff==0.0.291 +ruff==0.0.292 # via -r requirements-dev.in six==1.16.0 # via From f6a579f291be72f6f8dfe60211ff6ba73f4cf5f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:37:43 -0700 Subject: [PATCH 5/5] Bump coverage from 7.3.1 to 7.3.2 (#3832) Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.3.1 to 7.3.2. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.3.1...7.3.2) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index e1ca9097f6a6..83a98f567e51 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -20,7 +20,7 @@ click==8.1.7 # via # -r requirements-dev.in # black -coverage==7.3.1 +coverage==7.3.2 # via -r requirements-dev.in decorator==5.1.1 # via ipython