From ae76fe3c492590034476f82cde6515ca0c840f26 Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 23 Feb 2024 14:54:45 -0500 Subject: [PATCH 1/8] Bump version from 1.3.5 to 1.3.6 --- README.md | 20 ++++++++++---------- src/version.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 446bf74..aef8554 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ expects the secrets in a different location. To run the `cisagov/saver` image via Docker: ```console -docker run cisagov/saver:1.3.5 +docker run cisagov/saver:1.3.6 ``` ### Running with Docker Compose ### @@ -46,7 +46,7 @@ docker run cisagov/saver:1.3.5 services: saver: - image: cisagov/saver:1.3.5 + image: cisagov/saver:1.3.6 volumes: - type: bind source: @@ -92,7 +92,7 @@ environment variables. See the services: trustymail_reporter: - image: cisagov/saver:1.3.5 + image: cisagov/saver:1.3.6 volumes: - type: bind source: @@ -129,7 +129,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/saver:1.3.5 + docker pull cisagov/saver:1.3.6 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -139,11 +139,11 @@ environment variables. See the The images of this container are tagged with [semantic versions](https://semver.org) of the underlying saver project that they containerize. It is recommended that most users use a version tag (e.g. -`:1.3.5`). +`:1.3.6`). | Image:tag | Description | |-----------|-------------| -|`cisagov/saver:1.3.5`| An exact release version. | +|`cisagov/saver:1.3.6`| An exact release version. | |`cisagov/saver:1.3`| The most recent release matching the major and minor version numbers. | |`cisagov/saver:1`| The most recent release matching the major version number. | |`cisagov/saver:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -206,8 +206,8 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=1.3.5 \ - --tag cisagov/saver:1.3.5 \ + --build-arg VERSION=1.3.6 \ + --tag cisagov/saver:1.3.6 \ https://github.com/cisagov/saver.git#develop ``` @@ -237,9 +237,9 @@ Docker: docker buildx build \ --file Dockerfile-x \ --platform linux/amd64 \ - --build-arg VERSION=1.3.5 \ + --build-arg VERSION=1.3.6 \ --output type=docker \ - --tag cisagov/saver:1.3.5 . + --tag cisagov/saver:1.3.6 . ``` ## Contributing ## diff --git a/src/version.txt b/src/version.txt index 92857f8..75145de 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "1.3.5" +__version__ = "1.3.6" From a2c9a26e6dec948eef0f203ee992fff6e868d15c Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 23 Feb 2024 14:55:13 -0500 Subject: [PATCH 2/8] Bump version from 1.3.6 to 1.3.6-rc.1 --- README.md | 20 ++++++++++---------- src/version.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index aef8554..0332da2 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ expects the secrets in a different location. To run the `cisagov/saver` image via Docker: ```console -docker run cisagov/saver:1.3.6 +docker run cisagov/saver:1.3.6-rc.1 ``` ### Running with Docker Compose ### @@ -46,7 +46,7 @@ docker run cisagov/saver:1.3.6 services: saver: - image: cisagov/saver:1.3.6 + image: cisagov/saver:1.3.6-rc.1 volumes: - type: bind source: @@ -92,7 +92,7 @@ environment variables. See the services: trustymail_reporter: - image: cisagov/saver:1.3.6 + image: cisagov/saver:1.3.6-rc.1 volumes: - type: bind source: @@ -129,7 +129,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/saver:1.3.6 + docker pull cisagov/saver:1.3.6-rc.1 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -139,11 +139,11 @@ environment variables. See the The images of this container are tagged with [semantic versions](https://semver.org) of the underlying saver project that they containerize. It is recommended that most users use a version tag (e.g. -`:1.3.6`). +`:1.3.6-rc.1`). | Image:tag | Description | |-----------|-------------| -|`cisagov/saver:1.3.6`| An exact release version. | +|`cisagov/saver:1.3.6-rc.1`| An exact release version. | |`cisagov/saver:1.3`| The most recent release matching the major and minor version numbers. | |`cisagov/saver:1`| The most recent release matching the major version number. | |`cisagov/saver:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -206,8 +206,8 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=1.3.6 \ - --tag cisagov/saver:1.3.6 \ + --build-arg VERSION=1.3.6-rc.1 \ + --tag cisagov/saver:1.3.6-rc.1 \ https://github.com/cisagov/saver.git#develop ``` @@ -237,9 +237,9 @@ Docker: docker buildx build \ --file Dockerfile-x \ --platform linux/amd64 \ - --build-arg VERSION=1.3.6 \ + --build-arg VERSION=1.3.6-rc.1 \ --output type=docker \ - --tag cisagov/saver:1.3.6 . + --tag cisagov/saver:1.3.6-rc.1 . ``` ## Contributing ## diff --git a/src/version.txt b/src/version.txt index 75145de..73dc945 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "1.3.6" +__version__ = "1.3.6-rc.1" From 9845854317a1b8ef9adcc09165bbff971df8f687 Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 23 Feb 2024 14:55:28 -0500 Subject: [PATCH 3/8] Fix a syntax error --- src/sslyze_csv2mongo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sslyze_csv2mongo.py b/src/sslyze_csv2mongo.py index 07ddf8d..8bfe61d 100755 --- a/src/sslyze_csv2mongo.py +++ b/src/sslyze_csv2mongo.py @@ -180,7 +180,7 @@ def store_data(clean_federal, agency_dict, db_config_file): date_items = ("Not Before", "Not After") for date_item in date_items: if row[date_item]: - row[date_item] = datetime.datetime.strptime( + row[date_item] = datetime.strptime( row[date_item], "%Y-%m-%dT%H:%M:%S" ).replace(tzinfo=timezone("US/Eastern")) else: From a2f0583de478309945b8e2dcc669e959c4c52e5a Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 23 Feb 2024 15:45:42 -0500 Subject: [PATCH 4/8] Use zoneinfo for concrete time zone implementation --- src/sslyze_csv2mongo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sslyze_csv2mongo.py b/src/sslyze_csv2mongo.py index 8bfe61d..babf691 100755 --- a/src/sslyze_csv2mongo.py +++ b/src/sslyze_csv2mongo.py @@ -6,6 +6,7 @@ import csv from datetime import datetime, time, timezone import os +from zoneinfo import ZoneInfo # Third-Party Libraries from mongo_db_from_config import db_from_config @@ -182,7 +183,7 @@ def store_data(clean_federal, agency_dict, db_config_file): if row[date_item]: row[date_item] = datetime.strptime( row[date_item], "%Y-%m-%dT%H:%M:%S" - ).replace(tzinfo=timezone("US/Eastern")) + ).replace(tzinfo=ZoneInfo("US/Eastern")) else: row[date_item] = None From 9b06e731dfa5f95021fe64234325ab6b34b27ebc Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 23 Feb 2024 15:46:26 -0500 Subject: [PATCH 5/8] Bump version from 1.3.6-rc.1 to 1.3.6-rc.2 --- README.md | 20 ++++++++++---------- src/version.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0332da2..0cf365d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ expects the secrets in a different location. To run the `cisagov/saver` image via Docker: ```console -docker run cisagov/saver:1.3.6-rc.1 +docker run cisagov/saver:1.3.6-rc.2 ``` ### Running with Docker Compose ### @@ -46,7 +46,7 @@ docker run cisagov/saver:1.3.6-rc.1 services: saver: - image: cisagov/saver:1.3.6-rc.1 + image: cisagov/saver:1.3.6-rc.2 volumes: - type: bind source: @@ -92,7 +92,7 @@ environment variables. See the services: trustymail_reporter: - image: cisagov/saver:1.3.6-rc.1 + image: cisagov/saver:1.3.6-rc.2 volumes: - type: bind source: @@ -129,7 +129,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/saver:1.3.6-rc.1 + docker pull cisagov/saver:1.3.6-rc.2 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -139,11 +139,11 @@ environment variables. See the The images of this container are tagged with [semantic versions](https://semver.org) of the underlying saver project that they containerize. It is recommended that most users use a version tag (e.g. -`:1.3.6-rc.1`). +`:1.3.6-rc.2`). | Image:tag | Description | |-----------|-------------| -|`cisagov/saver:1.3.6-rc.1`| An exact release version. | +|`cisagov/saver:1.3.6-rc.2`| An exact release version. | |`cisagov/saver:1.3`| The most recent release matching the major and minor version numbers. | |`cisagov/saver:1`| The most recent release matching the major version number. | |`cisagov/saver:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -206,8 +206,8 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=1.3.6-rc.1 \ - --tag cisagov/saver:1.3.6-rc.1 \ + --build-arg VERSION=1.3.6-rc.2 \ + --tag cisagov/saver:1.3.6-rc.2 \ https://github.com/cisagov/saver.git#develop ``` @@ -237,9 +237,9 @@ Docker: docker buildx build \ --file Dockerfile-x \ --platform linux/amd64 \ - --build-arg VERSION=1.3.6-rc.1 \ + --build-arg VERSION=1.3.6-rc.2 \ --output type=docker \ - --tag cisagov/saver:1.3.6-rc.1 . + --tag cisagov/saver:1.3.6-rc.2 . ``` ## Contributing ## diff --git a/src/version.txt b/src/version.txt index 73dc945..0b05538 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "1.3.6-rc.1" +__version__ = "1.3.6-rc.2" From 87661a0e14c10161ea4d077c6627dae0e411d4b3 Mon Sep 17 00:00:00 2001 From: Shane Frasier Date: Sat, 24 Feb 2024 10:44:39 -0500 Subject: [PATCH 6/8] Use the more standard name for the US Eastern time zone Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com> --- src/sslyze_csv2mongo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sslyze_csv2mongo.py b/src/sslyze_csv2mongo.py index babf691..daced9f 100755 --- a/src/sslyze_csv2mongo.py +++ b/src/sslyze_csv2mongo.py @@ -183,7 +183,7 @@ def store_data(clean_federal, agency_dict, db_config_file): if row[date_item]: row[date_item] = datetime.strptime( row[date_item], "%Y-%m-%dT%H:%M:%S" - ).replace(tzinfo=ZoneInfo("US/Eastern")) + ).replace(tzinfo=ZoneInfo("America/New_York")) else: row[date_item] = None From b300f585dda469548c94c17bb593f2f761edfc8a Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Sun, 25 Feb 2024 09:50:24 -0500 Subject: [PATCH 7/8] Prefer ZoneInfo("UTC") to timezone.utc Co-authored-by: Nick <50747025+mcdonnnj@users.noreply.github.com> --- src/pshtt_csv2mongo.py | 5 +++-- src/sslyze_csv2mongo.py | 4 ++-- src/trustymail_csv2mongo.py | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pshtt_csv2mongo.py b/src/pshtt_csv2mongo.py index 451352b..cc5624e 100755 --- a/src/pshtt_csv2mongo.py +++ b/src/pshtt_csv2mongo.py @@ -4,9 +4,10 @@ # Standard Python Libraries import csv -from datetime import datetime, time, timezone +from datetime import datetime, time import os import re +from zoneinfo import ZoneInfo # Third-Party Libraries from mongo_db_from_config import db_from_config @@ -103,7 +104,7 @@ def store_data(clean_federal, agency_dict, db_config_file): :param db_config_file: The name of the file where the database configuration is stored """ - date_today = datetime.combine(datetime.now(timezone.utc), time.min) + date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min) db = db_from_config(db_config_file) # set up database connection f = open(PSHTT_RESULTS_FILE) csv_f = csv.DictReader(f) diff --git a/src/sslyze_csv2mongo.py b/src/sslyze_csv2mongo.py index daced9f..9e177a7 100755 --- a/src/sslyze_csv2mongo.py +++ b/src/sslyze_csv2mongo.py @@ -4,7 +4,7 @@ # Standard Python Libraries import csv -from datetime import datetime, time, timezone +from datetime import datetime, time import os from zoneinfo import ZoneInfo @@ -103,7 +103,7 @@ def store_data(clean_federal, agency_dict, db_config_file): :param db_config_file: The name of the file where the database configuration is stored """ - date_today = datetime.combine(datetime.now(timezone.utc), time.min) + date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min) db = db_from_config(db_config_file) # set up database connection f = open(SSLYZE_RESULTS_FILE) csv_f = csv.DictReader(f) diff --git a/src/trustymail_csv2mongo.py b/src/trustymail_csv2mongo.py index 54d30e6..d70ed8a 100755 --- a/src/trustymail_csv2mongo.py +++ b/src/trustymail_csv2mongo.py @@ -4,8 +4,9 @@ # Standard Python Libraries import csv -from datetime import datetime, time, timezone +from datetime import datetime, time import os +from zoneinfo import ZoneInfo # Third-Party Libraries from mongo_db_from_config import db_from_config @@ -101,7 +102,7 @@ def store_data(clean_federal, agency_dict, db_config_file): :param db_config_file: The name of the file where the database configuration is stored """ - date_today = datetime.combine(datetime.now(timezone.utc), time.min) + date_today = datetime.combine(datetime.now(ZoneInfo("UTC")), time.min) db = db_from_config(db_config_file) # set up database connection f = open(TRUSTYMAIL_RESULTS_FILE) csv_f = csv.DictReader(f) From dbec4703a6e4499f71c8e5444e128f309e685c61 Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Mon, 26 Feb 2024 15:19:52 -0500 Subject: [PATCH 8/8] Finalize version from 1.3.6-rc.2 to 1.3.6 --- README.md | 20 ++++++++++---------- src/version.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0cf365d..aef8554 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ expects the secrets in a different location. To run the `cisagov/saver` image via Docker: ```console -docker run cisagov/saver:1.3.6-rc.2 +docker run cisagov/saver:1.3.6 ``` ### Running with Docker Compose ### @@ -46,7 +46,7 @@ docker run cisagov/saver:1.3.6-rc.2 services: saver: - image: cisagov/saver:1.3.6-rc.2 + image: cisagov/saver:1.3.6 volumes: - type: bind source: @@ -92,7 +92,7 @@ environment variables. See the services: trustymail_reporter: - image: cisagov/saver:1.3.6-rc.2 + image: cisagov/saver:1.3.6 volumes: - type: bind source: @@ -129,7 +129,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/saver:1.3.6-rc.2 + docker pull cisagov/saver:1.3.6 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -139,11 +139,11 @@ environment variables. See the The images of this container are tagged with [semantic versions](https://semver.org) of the underlying saver project that they containerize. It is recommended that most users use a version tag (e.g. -`:1.3.6-rc.2`). +`:1.3.6`). | Image:tag | Description | |-----------|-------------| -|`cisagov/saver:1.3.6-rc.2`| An exact release version. | +|`cisagov/saver:1.3.6`| An exact release version. | |`cisagov/saver:1.3`| The most recent release matching the major and minor version numbers. | |`cisagov/saver:1`| The most recent release matching the major version number. | |`cisagov/saver:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -206,8 +206,8 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=1.3.6-rc.2 \ - --tag cisagov/saver:1.3.6-rc.2 \ + --build-arg VERSION=1.3.6 \ + --tag cisagov/saver:1.3.6 \ https://github.com/cisagov/saver.git#develop ``` @@ -237,9 +237,9 @@ Docker: docker buildx build \ --file Dockerfile-x \ --platform linux/amd64 \ - --build-arg VERSION=1.3.6-rc.2 \ + --build-arg VERSION=1.3.6 \ --output type=docker \ - --tag cisagov/saver:1.3.6-rc.2 . + --tag cisagov/saver:1.3.6 . ``` ## Contributing ## diff --git a/src/version.txt b/src/version.txt index 0b05538..75145de 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "1.3.6-rc.2" +__version__ = "1.3.6"