CirclesUBI / infrastructure-provisioning

Infrastructure and Services for Circles
GNU Affero General Public License v3.0
5 stars 2 forks source link

[circles-api] Codepipeline is failing to get build artifacts from S3 #32

Closed edzillion closed 5 years ago

edzillion commented 5 years ago

AFAIK this just started occuring, at first it was occasional but now I can't get it to build. The error has always been the same. It fails on the DOWNLOAD_SOURCE phase:

DOWNLOAD_SOURCE
Failed
CLIENT_ERROR: RequestError: send request failed caused by: Get https://circles-api.s3.eu-central-1.amazonaws.com/circles-api-pipeline/source-1/y3oenS8.zip: dial tcp 52.219.74.13:443: i/o timeout for primary source and source version arn:aws:s3:::circles-api/circles-api-pipeline/source-1/y3oenS8.zip

If I look in S3 that file is present, and I am pretty sure that if it was a permission issue the error would reflect that.

This SO question seems to be a similar problem, as does this

But both of them are issues with the initial phase, downloading from github, which works fine in our case. Unfortunately this seems to negate the explanation that it is because the build instance does not have internet access.

I might just rebuild the terraform stuff from scratch. I would love to move the VPC out of the rocketchat state as described here at the same time but that is gonna take our chat server down for at least part of a day: https://github.com/CirclesUBI/infrastructure-provisioning/issues/25

edzillion commented 5 years ago

Tried deleting the bucket and having terraform recreate. same error

edzillion commented 5 years ago

Hmm. removing the Test phase from the build fixes it.

edzillion commented 5 years ago

Ok seems like it was caused by the vpc_config settings in the Test phase which I have removed:

vpc_config {
    security_group_ids = ["${var.run_task_security_group_ids}"]
    subnets = ["${var.run_task_subnet_id}", "${var.db_subnet_id}"]
    vpc_id = "${var.vpc_id}"
}

I thought I needed this to get the migrations to run against the live db ... but apparently not :confused: ?