deis / postgres

A PostgreSQL database used by Deis Workflow.
https://deis.com
MIT License
36 stars 22 forks source link

fix(create_bucket): avoid S3 InvalidLocationConstraint error #187

Closed aboyett closed 7 years ago

aboyett commented 7 years ago

calling create_bucket(bucket_name, region="us-east-1") yields the following error:

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidLocationConstraint</Code>
<Message>The specified location-constraint is not valid</Message>
<LocationConstraint>us-east-1</LocationConstraint>...</Error>

based on the comments in boto/boto3#125 this commit omits the region kwarg to the create_bucket() call when s3.region is set to "us-east-1"

deis-admin commented 7 years ago

Thanks for the contribution! Please ensure your commits follow our style guide. This code will be tested once a Deis maintainer reviews it.

aboyett commented 7 years ago

The travis build failed because the postgres version used in the image is no longer available from the postgres apt repositories. PR #188 fixes the failure.

mboersma commented 7 years ago

Jenkins, add to whitelist.