deis / postgres

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

fix(create_bucket): try default s3 region on create error #176

Closed bacongobbler closed 7 years ago

bacongobbler commented 7 years ago

continuation of #175. If we fail to create the bucket in the specified region, it means the user has created the bucket in us-east-1 (see #173). We can then assume that we want wal-e to connect to said bucket in us-east-1. I've added a note that we'll want to remove this code once we drop support for v2.8.0 and earlier versions.

closes #173 closes #175

deis-bot commented 7 years ago

@kmala and @paulczar are potential reviewers of this pull request based on my analysis of git blame information. Thanks @bacongobbler!

mboersma commented 7 years ago

Nice! I'll test now. You can squash or remove the first commit to clean it up--this is much simpler.

bacongobbler commented 7 years ago

I figured I'd keep your commit in there for credit :) I shall do so now.

bacongobbler commented 7 years ago

fwiw I just manually tested this on an upgrade from v2.8.0 to v2.9.0 + this image and it seems to be working for me.

mboersma commented 7 years ago

I also tested on a broken upgraded S3 cluster and this seems to do the trick. Wal-e found its backup and everything recovered (after flapping for two hours with my previous attempt at fixing this).

bacongobbler commented 7 years ago

I'm going to go ahead and merge this as two of us have manually tested these changes and everything works as intended. CI's breaking due to unrelated changes.