From 2a6b69ab45b5254a2680f75beb846c005a343aaf Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 10 Jun 2024 11:54:32 -0700 Subject: [PATCH 1/8] Upgrade terraform-cloudgov, remove recursive_delete, add prevent_destroy --- terraform/demo/main.tf | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/terraform/demo/main.tf b/terraform/demo/main.tf index 615f92670..1a96c5e4a 100644 --- a/terraform/demo/main.tf +++ b/terraform/demo/main.tf @@ -3,35 +3,40 @@ locals { cf_space_name = "notify-demo" env = "demo" app_name = "notify-api" - recursive_delete = false + recursive_delete = false # deprecated, still used in shared modules +} + + +resource "null_resource" "prevent_destroy" { + + lifecycle { + prevent_destroy = true + } } module "database" { - source = "github.com/18f/terraform-cloudgov//database?ref=v0.7.1" + source = "github.com/GSA-TTS/terraform-cloudgov//database?ref=v1.0.0" cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name name = "${local.app_name}-rds-${local.env}" - recursive_delete = local.recursive_delete rds_plan_name = "micro-psql" } module "redis" { - source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1" + source = "github.com/GSA-TTS/terraform-cloudgov//redis?ref=v1.0.0" cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name name = "${local.app_name}-redis-${local.env}" - recursive_delete = local.recursive_delete redis_plan_name = "redis-dev" } module "csv_upload_bucket" { - source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1" + source = "github.com/GSA-TTS/terraform-cloudgov//s3?ref=v1.0.0" cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name - recursive_delete = local.recursive_delete name = "${local.app_name}-csv-upload-bucket-${local.env}" } @@ -52,7 +57,6 @@ module "ses_email" { cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name name = "${local.app_name}-ses-${local.env}" - recursive_delete = local.recursive_delete aws_region = "us-west-2" email_domain = "notify.sandbox.10x.gsa.gov" email_receipt_error = "notify-support@gsa.gov" @@ -64,7 +68,6 @@ module "sns_sms" { cf_org_name = local.cf_org_name cf_space_name = local.cf_space_name name = "${local.app_name}-sns-${local.env}" - recursive_delete = local.recursive_delete aws_region = "us-east-1" monthly_spend_limit = 25 } From a580368ccee3d3f143d294ea98ccbffdbd366707 Mon Sep 17 00:00:00 2001 From: John Skiles Skinner Date: Mon, 10 Jun 2024 11:57:49 -0700 Subject: [PATCH 2/8] Terraform fmt --- terraform/demo/main.tf | 22 +++++++++++----------- terraform/sandbox/main.tf | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/terraform/demo/main.tf b/terraform/demo/main.tf index 1a96c5e4a..9b933c409 100644 --- a/terraform/demo/main.tf +++ b/terraform/demo/main.tf @@ -17,27 +17,27 @@ resource "null_resource" "prevent_destroy" { module "database" { source = "github.com/GSA-TTS/terraform-cloudgov//database?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-rds-${local.env}" - rds_plan_name = "micro-psql" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-rds-${local.env}" + rds_plan_name = "micro-psql" } module "redis" { source = "github.com/GSA-TTS/terraform-cloudgov//redis?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-redis-${local.env}" - redis_plan_name = "redis-dev" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-redis-${local.env}" + redis_plan_name = "redis-dev" } module "csv_upload_bucket" { source = "github.com/GSA-TTS/terraform-cloudgov//s3?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-csv-upload-bucket-${local.env}" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-csv-upload-bucket-${local.env}" } module "egress-space" { diff --git a/terraform/sandbox/main.tf b/terraform/sandbox/main.tf index cc99b033b..cf7f95e29 100644 --- a/terraform/sandbox/main.tf +++ b/terraform/sandbox/main.tf @@ -9,27 +9,27 @@ locals { module "database" { source = "github.com/GSA-TTS/terraform-cloudgov//database?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-rds-${local.env}" - rds_plan_name = "micro-psql" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-rds-${local.env}" + rds_plan_name = "micro-psql" } module "redis" { source = "github.com/GSA-TTS/terraform-cloudgov//redis?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-redis-${local.env}" - redis_plan_name = "redis-dev" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-redis-${local.env}" + redis_plan_name = "redis-dev" } module "csv_upload_bucket" { source = "github.com/GSA-TTS/terraform-cloudgov//s3?ref=v1.0.0" - cf_org_name = local.cf_org_name - cf_space_name = local.cf_space_name - name = "${local.app_name}-csv-upload-bucket-${local.env}" + cf_org_name = local.cf_org_name + cf_space_name = local.cf_space_name + name = "${local.app_name}-csv-upload-bucket-${local.env}" } module "egress-space" { From 96fc71a88d66bdc0df3ef6a9428e36efc5362891 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:30:55 +0000 Subject: [PATCH 3/8] Bump phonenumbers from 8.13.38 to 8.13.39 Bumps [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers) from 8.13.38 to 8.13.39. - [Commits](https://github.com/daviddrysdale/python-phonenumbers/compare/v8.13.38...v8.13.39) --- updated-dependencies: - dependency-name: phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5d95cdd54..1966be25a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2826,13 +2826,13 @@ ptyprocess = ">=0.5" [[package]] name = "phonenumbers" -version = "8.13.38" +version = "8.13.39" description = "Python version of Google's common library for parsing, formatting, storing and validating international phone numbers." optional = false python-versions = "*" files = [ - {file = "phonenumbers-8.13.38-py2.py3-none-any.whl", hash = "sha256:d22aa747fb591ef2a18afec13cab5a0e294ab20fce5a1560e4949e459e70eeef"}, - {file = "phonenumbers-8.13.38.tar.gz", hash = "sha256:2822c74ee9334e9d8ad792fc352cc8d21004307349b6b1bb61da12937fa2eaba"}, + {file = "phonenumbers-8.13.39-py2.py3-none-any.whl", hash = "sha256:3ad2d086fa71e7eef409001b9195ac54bebb0c6e3e752209b558ca192c9229a0"}, + {file = "phonenumbers-8.13.39.tar.gz", hash = "sha256:db7ca4970d206b2056231105300753b1a5b229f43416f8c2b3010e63fbb68d77"}, ] [[package]] @@ -4752,4 +4752,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.12.2" -content-hash = "460acc2fefc9038bbbf2290afb1c657ea43018dd8abb626370044988d49744d6" +content-hash = "122fe6459adad8b8105d12739e4db159ae39fc32e969d02c7c24436ed3fb85b1" diff --git a/pyproject.toml b/pyproject.toml index f9cf4ff6e..ff5d6a959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ geojson = "^3.1.0" govuk-bank-holidays = "^0.14" numpy = "^1.26.4" ordered-set = "^4.1.0" -phonenumbers = "^8.13.38" +phonenumbers = "^8.13.39" python-json-logger = "^2.0.7" pytz = "^2024.1" regex = "^2024.5.15" From 573b147d35804d8eb82d63c133d48d432cf5be3a Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 20 Jun 2024 10:37:46 -0700 Subject: [PATCH 4/8] pin python to 3.12.2 --- .github/actions/setup-project/action.yml | 4 ++-- poetry.lock | 12 ++++-------- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index ac16ab41e..560c5c3f3 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -9,10 +9,10 @@ runs: sudo apt-get update \ && sudo apt-get install -y --no-install-recommends \ libcurl4-openssl-dev - - name: Set up Python 3.12 + - name: Set up Python 3.12.2 uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.12.2" - name: Install poetry shell: bash run: pip install --upgrade poetry diff --git a/poetry.lock b/poetry.lock index 1966be25a..094cc4dce 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohttp" @@ -2098,13 +2098,9 @@ files = [ {file = "lxml-5.2.2-cp36-cp36m-win_amd64.whl", hash = "sha256:edcfa83e03370032a489430215c1e7783128808fd3e2e0a3225deee278585196"}, {file = "lxml-5.2.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28bf95177400066596cdbcfc933312493799382879da504633d16cf60bba735b"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a745cc98d504d5bd2c19b10c79c61c7c3df9222629f1b6210c0368177589fb8"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b590b39ef90c6b22ec0be925b211298e810b4856909c8ca60d27ffbca6c12e6"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b336b0416828022bfd5a2e3083e7f5ba54b96242159f83c7e3eebaec752f1716"}, - {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:c2faf60c583af0d135e853c86ac2735ce178f0e338a3c7f9ae8f622fd2eb788c"}, {file = "lxml-5.2.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:4bc6cb140a7a0ad1f7bc37e018d0ed690b7b6520ade518285dc3171f7a117905"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7ff762670cada8e05b32bf1e4dc50b140790909caa8303cfddc4d702b71ea184"}, {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:57f0a0bbc9868e10ebe874e9f129d2917750adf008fe7b9c1598c0fbbfdde6a6"}, - {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:a6d2092797b388342c1bc932077ad232f914351932353e2e8706851c870bca1f"}, {file = "lxml-5.2.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:60499fe961b21264e17a471ec296dcbf4365fbea611bf9e303ab69db7159ce61"}, {file = "lxml-5.2.2-cp37-cp37m-win32.whl", hash = "sha256:d9b342c76003c6b9336a80efcc766748a333573abf9350f4094ee46b006ec18f"}, {file = "lxml-5.2.2-cp37-cp37m-win_amd64.whl", hash = "sha256:b16db2770517b8799c79aa80f4053cd6f8b716f21f8aca962725a9565ce3ee40"}, @@ -2493,6 +2489,7 @@ files = [ {file = "msgpack-1.0.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273"}, {file = "msgpack-1.0.8-cp39-cp39-win32.whl", hash = "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d"}, {file = "msgpack-1.0.8-cp39-cp39-win_amd64.whl", hash = "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011"}, + {file = "msgpack-1.0.8-py3-none-any.whl", hash = "sha256:24f727df1e20b9876fa6e95f840a2a2651e34c0ad147676356f4bf5fbb0206ca"}, {file = "msgpack-1.0.8.tar.gz", hash = "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3"}, ] @@ -3475,7 +3472,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -4751,5 +4747,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = "^3.12.2" -content-hash = "122fe6459adad8b8105d12739e4db159ae39fc32e969d02c7c24436ed3fb85b1" +python-versions = "==3.12.2" +content-hash = "baa97f6f154c63af1c9a727fc8245a36e182190eaa65c77ebd95effc693e576c" diff --git a/pyproject.toml b/pyproject.toml index ff5d6a959..5f0016c5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] -python = "^3.12.2" +python = "==3.12.2" alembic = "==1.13.1" amqp = "==5.2.0" beautifulsoup4 = "==4.12.3" From c9b39a87c49baf0f02bac719defec1a51cf7aa59 Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Thu, 20 Jun 2024 14:46:44 -0400 Subject: [PATCH 5/8] Fix runtime.txt for cloud.gov and Python This changeset updates the runtime.txt file to match the recent Python version pinning that we had to do to fix a dependency issue. Signed-off-by: Carlo Costino --- runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.txt b/runtime.txt index 64f28603a..6e797d468 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.12.x +python-3.12.2 From 0385e6a4e358b723d924a95076310b4629851577 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 20 Jun 2024 12:20:20 -0700 Subject: [PATCH 6/8] pin python to 3.12.3 --- .github/actions/setup-project/action.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index 560c5c3f3..c095bd595 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -9,10 +9,10 @@ runs: sudo apt-get update \ && sudo apt-get install -y --no-install-recommends \ libcurl4-openssl-dev - - name: Set up Python 3.12.2 + - name: Set up Python 3.12.3 uses: actions/setup-python@v4 with: - python-version: "3.12.2" + python-version: "3.12.3" - name: Install poetry shell: bash run: pip install --upgrade poetry diff --git a/pyproject.toml b/pyproject.toml index 5f0016c5e..b0d952504 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] -python = "==3.12.2" +python = "==3.12.3" alembic = "==1.13.1" amqp = "==5.2.0" beautifulsoup4 = "==4.12.3" From 5b39b77ca1994eb0f407b28310554dff692988c4 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 20 Jun 2024 12:25:22 -0700 Subject: [PATCH 7/8] move github to 3.12.3 --- poetry.lock | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 094cc4dce..29222296c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4747,5 +4747,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = "==3.12.2" -content-hash = "baa97f6f154c63af1c9a727fc8245a36e182190eaa65c77ebd95effc693e576c" +python-versions = "^3.12.2" +content-hash = "122fe6459adad8b8105d12739e4db159ae39fc32e969d02c7c24436ed3fb85b1" diff --git a/pyproject.toml b/pyproject.toml index b0d952504..ff5d6a959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] -python = "==3.12.3" +python = "^3.12.2" alembic = "==1.13.1" amqp = "==5.2.0" beautifulsoup4 = "==4.12.3" From 1c64c80038533302a0ca8991f2e63e622cae063a Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Thu, 20 Jun 2024 17:58:47 -0400 Subject: [PATCH 8/8] Update runtime.txt to match Python 3.12.3 for the cloud.gov python buildpak Signed-off-by: Carlo Costino --- runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.txt b/runtime.txt index 64f28603a..4ddc7cd66 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.12.x +python-3.12.3