From cf2ff6e28d99c9cf9d1727ab4a210e53a584e7f7 Mon Sep 17 00:00:00 2001 From: Andrew <84722778+andrew-jameson@users.noreply.github.com> Date: Mon, 16 Oct 2023 13:56:46 -0400 Subject: [PATCH 1/8] Update cloudgov.py --- tdrs-backend/tdpservice/settings/cloudgov.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/settings/cloudgov.py b/tdrs-backend/tdpservice/settings/cloudgov.py index 6f7c7342b..4f3aff9e8 100644 --- a/tdrs-backend/tdpservice/settings/cloudgov.py +++ b/tdrs-backend/tdpservice/settings/cloudgov.py @@ -70,7 +70,11 @@ class CloudGov(Common): # env_based_db_name = f'tdp_db_{cloudgov_space_suffix}_{cloudgov_name}' - db_name = database_creds['db_name'] if (cloudgov_space_suffix in ["prod", "staging"]) else env_based_db_name + logger.debug("css: " + cloudgov_space_suffix}) + if (cloudgov_space_suffix in ["prod", "staging"]): + db_name = database_creds['db_name'] + else: + db_name = env_based_db_name DATABASES = { 'default': { From d9d202f202981df77b2ffaa42eb0bc72cf0a932d Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Mon, 16 Oct 2023 14:00:16 -0400 Subject: [PATCH 2/8] hijack develop workflow to test deployments. --- .circleci/deployment/workflows.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index 5689b83bc..aafe73d74 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -35,6 +35,7 @@ branches: only: - develop + - debug/develop-deployment-failures - enable-versioning: requires: - deploy-infrastructure-develop @@ -46,6 +47,7 @@ branches: only: - develop + - debug/develop-deployment-failures - deploy-develop: requires: - deploy-infrastructure-develop @@ -53,6 +55,7 @@ branches: only: - develop + - debug/develop-deployment-failures - test-deployment-e2e: requires: - deploy-develop From 8ec2432a7255c5ed9c914d8fb2535f6480794737 Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Mon, 16 Oct 2023 14:05:54 -0400 Subject: [PATCH 3/8] syntax typo. --- tdrs-backend/tdpservice/settings/cloudgov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/settings/cloudgov.py b/tdrs-backend/tdpservice/settings/cloudgov.py index 4f3aff9e8..317c4678d 100644 --- a/tdrs-backend/tdpservice/settings/cloudgov.py +++ b/tdrs-backend/tdpservice/settings/cloudgov.py @@ -70,7 +70,7 @@ class CloudGov(Common): # env_based_db_name = f'tdp_db_{cloudgov_space_suffix}_{cloudgov_name}' - logger.debug("css: " + cloudgov_space_suffix}) + logger.debug("css: " + cloudgov_space_suffix) if (cloudgov_space_suffix in ["prod", "staging"]): db_name = database_creds['db_name'] else: From f897a4fd93f7c5b165b4a635edd0044f50d7c813 Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Tue, 17 Oct 2023 13:36:59 -0400 Subject: [PATCH 4/8] I can't believe this typo. --- scripts/deploy-backend.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index f50152891..7a66e5d24 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -128,7 +128,7 @@ update_backend() bind_backend_to_services() { echo "Binding services to app: $CGAPPNAME_BACKEND" - if [ "$CFAPPNAME_BACKEND" = "tdp-backend-develop" ]; then + if [ "$CGAPPNAME_BACKEND" = "tdp-backend-develop" ]; then # TODO: this is technical debt, we should either make staging mimic tanf-dev # or make unique services for all apps but we have a services limit # Introducing technical debt for release 3.0.0 specifically. From ecee495f7c69ff636ceed8510d333d221e538d28 Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Wed, 18 Oct 2023 10:14:10 -0400 Subject: [PATCH 5/8] linting whitespace --- tdrs-backend/tdpservice/settings/cloudgov.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrs-backend/tdpservice/settings/cloudgov.py b/tdrs-backend/tdpservice/settings/cloudgov.py index 317c4678d..4758fb062 100644 --- a/tdrs-backend/tdpservice/settings/cloudgov.py +++ b/tdrs-backend/tdpservice/settings/cloudgov.py @@ -72,8 +72,8 @@ class CloudGov(Common): logger.debug("css: " + cloudgov_space_suffix) if (cloudgov_space_suffix in ["prod", "staging"]): - db_name = database_creds['db_name'] - else: + db_name = database_creds['db_name'] + else: db_name = env_based_db_name DATABASES = { From fe8a2e4b69f35e59bc14c63be16fc0734170bd4f Mon Sep 17 00:00:00 2001 From: George Hudson Date: Wed, 18 Oct 2023 11:42:14 -0600 Subject: [PATCH 6/8] removed extra space --- tdrs-backend/tdpservice/settings/cloudgov.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/settings/cloudgov.py b/tdrs-backend/tdpservice/settings/cloudgov.py index 4758fb062..b7def9383 100644 --- a/tdrs-backend/tdpservice/settings/cloudgov.py +++ b/tdrs-backend/tdpservice/settings/cloudgov.py @@ -71,7 +71,7 @@ class CloudGov(Common): env_based_db_name = f'tdp_db_{cloudgov_space_suffix}_{cloudgov_name}' logger.debug("css: " + cloudgov_space_suffix) - if (cloudgov_space_suffix in ["prod", "staging"]): + if (cloudgov_space_suffix in ["prod", "staging"]): db_name = database_creds['db_name'] else: db_name = env_based_db_name From 088ab6b6530bad8e163f98b08752cd0dc82f553f Mon Sep 17 00:00:00 2001 From: andrew-jameson Date: Fri, 20 Oct 2023 14:55:00 -0400 Subject: [PATCH 7/8] Adding in staging jwt_key due to recent deployment failure. --- scripts/deploy-backend.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/deploy-backend.sh b/scripts/deploy-backend.sh index 7a66e5d24..7fb1fb657 100755 --- a/scripts/deploy-backend.sh +++ b/scripts/deploy-backend.sh @@ -51,6 +51,8 @@ set_cf_envs() "FRONTEND_BASE_URL" "LOGGING_LEVEL" "REDIS_URI" + "JWT_KEY" + "STAGING_JWT_KEY" ) echo "Setting environment variables for $CGAPPNAME_BACKEND" @@ -62,6 +64,8 @@ set_cf_envs() cf_cmd="cf unset-env $CGAPPNAME_BACKEND $var_name ${!var_name}" $cf_cmd continue + elif [[ ("$var_name" =~ "STAGING_*") && ("$CF_SPACE" = "tanf-staging") ]]; then + var_name=$(echo "$var_name" | sed -e 's@STAGING_@@g') fi cf_cmd="cf set-env $CGAPPNAME_BACKEND $var_name ${!var_name}" From 437f893a491ab82718c5be9e42ba25b4cd395bbf Mon Sep 17 00:00:00 2001 From: Andrew <84722778+andrew-jameson@users.noreply.github.com> Date: Mon, 23 Oct 2023 13:10:42 -0400 Subject: [PATCH 8/8] Removing self-reference branch filter for mergability --- .circleci/deployment/workflows.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/deployment/workflows.yml b/.circleci/deployment/workflows.yml index aafe73d74..5689b83bc 100644 --- a/.circleci/deployment/workflows.yml +++ b/.circleci/deployment/workflows.yml @@ -35,7 +35,6 @@ branches: only: - develop - - debug/develop-deployment-failures - enable-versioning: requires: - deploy-infrastructure-develop @@ -47,7 +46,6 @@ branches: only: - develop - - debug/develop-deployment-failures - deploy-develop: requires: - deploy-infrastructure-develop @@ -55,7 +53,6 @@ branches: only: - develop - - debug/develop-deployment-failures - test-deployment-e2e: requires: - deploy-develop