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

Production deploy 1/30/24 #1173

Merged
merged 6 commits into from
Jan 30, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/main/views/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,14 +880,20 @@ def send_notification(service_id, template_id):
service_id, job_id=upload_id, include_one_off=True
)
attempts = 0
while notifications["total"] == 0 and attempts < 5:

# The response can come back in different forms of incompleteness
while (
notifications["total"] == 0
and notifications["notifications"] == []
and attempts < 50
):
notifications = notification_api_client.get_notifications_for_service(
service_id, job_id=upload_id, include_one_off=True
)
time.sleep(0.1)
attempts = attempts + 1

if notifications["total"] == 0 and attempts == 5:
if notifications["total"] == 0 and attempts == 50:
# This shows the job we auto-generated for the user
return redirect(
url_for(
Expand Down
2 changes: 2 additions & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ The below steps rely on you first configuring access to the Terraform state in s
terraform plan
```

If the `terraform init` command fails, you may need to run `terraform init -upgrade` to make sure new module versions are picked up.

1. Apply changes with `terraform apply`.

1. Remove the space deployer service instance if it doesn't need to be used again, such as when manually running terraform once.
Expand Down
2 changes: 1 addition & 1 deletion terraform/bootstrap/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
version = "0.53.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions terraform/demo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
}

module "redis" {
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand All @@ -17,7 +17,7 @@ module "redis" {
}

module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down
3 changes: 1 addition & 2 deletions terraform/demo/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
version = "0.53.0"
}
}

Expand All @@ -12,7 +12,6 @@ terraform {
key = "admin.tfstate.demo"
encrypt = "true"
region = "us-gov-west-1"
profile = "notify-terraform-backend"
}
}

Expand Down
2 changes: 1 addition & 1 deletion terraform/development/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data "cloudfoundry_space" "dev" {
}

module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down
2 changes: 1 addition & 1 deletion terraform/development/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.50.7"
version = "0.53.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/development/reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [[ ! -s "secrets.auto.tfvars" ]]; then
fi

echo "Importing terraform state for $username"
terraform init
terraform init -upgrade

key_name=$username-admin-dev-key

Expand Down
6 changes: 3 additions & 3 deletions terraform/production/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
}

module "redis" {
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand All @@ -17,7 +17,7 @@ module "redis" {
}

module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down Expand Up @@ -50,7 +50,7 @@ module "api_network_route" {
# https://cloud.gov/docs/services/external-domain-service/#how-to-create-an-instance-of-this-service
###########################################################################
module "domain" {
source = "github.com/18f/terraform-cloudgov//domain?ref=v0.5.2"
source = "github.com/18f/terraform-cloudgov//domain?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down
3 changes: 1 addition & 2 deletions terraform/production/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
version = "0.53.0"
}
}

Expand All @@ -12,7 +12,6 @@ terraform {
key = "admin.tfstate.prod"
encrypt = "true"
region = "us-gov-west-1"
profile = "notify-terraform-backend"
}
}

Expand Down
4 changes: 2 additions & 2 deletions terraform/sandbox/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
}

module "redis" {
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand All @@ -17,7 +17,7 @@ module "redis" {
}

module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down
3 changes: 1 addition & 2 deletions terraform/sandbox/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
version = "0.53.0"
}
}

Expand All @@ -12,7 +12,6 @@ terraform {
key = "admin.tfstate.sandbox"
encrypt = "true"
region = "us-gov-west-1"
profile = "notify-terraform-backend"
}
}

Expand Down
2 changes: 1 addition & 1 deletion terraform/shared/container_networking/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "~> 0.15"
version = "0.53.0"
}
}
}
4 changes: 2 additions & 2 deletions terraform/staging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
}

module "redis" {
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand All @@ -17,7 +17,7 @@ module "redis" {
}

module "logo_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"

cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
Expand Down
3 changes: 1 addition & 2 deletions terraform/staging/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
cloudfoundry = {
source = "cloudfoundry-community/cloudfoundry"
version = "0.15.5"
version = "0.53.0"
}
}

Expand All @@ -12,7 +12,6 @@ terraform {
key = "admin.tfstate.stage"
encrypt = "true"
region = "us-gov-west-1"
profile = "notify-terraform-backend"
}
}

Expand Down
Loading