-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
PostgreSQL high availability #1001
PostgreSQL high availability #1001
Conversation
Pull in updates to the generated sqladmin api and update callers for the change in the StorageAutoResize setting
Allow specifying ZONAL or REGIONAL to allow for PostgreSQL HA setup.
Hey @danawillow, this PR should cover the comments you made on #695. Can you give this a second pass please? |
@@ -568,7 +606,7 @@ func testAccCheckGoogleSqlDatabaseInstanceEquals(n string, | |||
return fmt.Errorf("Error settings.crash_safe_replication mismatch, (%s, %s)", server, local) | |||
} | |||
|
|||
server = strconv.FormatBool(instance.Settings.StorageAutoResize) | |||
server = strconv.FormatBool(*instance.Settings.StorageAutoResize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing panics at this line when running tests, can you check it out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a look at this now- do you have the test that caused the fatal? Would speed up things on my end, as the few I've been running do not!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think I've got a fix for this, will update the PR once I've confirmed tests pass.
Add tests that cover the creation of a Postgres database with AvailabilityType set to REGIONAL, and correct some small issues that were preventing compilation.
24e27cc
to
9c895d3
Compare
googleapis/google-api-go-client@95e5582 The cloudsql admin client changed the way it handles StorageAutoResize as a parameter, in order to be more explicit about when the server has ommitted the field. This changed the type from being bool to *bool, and we need to modify provider code so that we supply the right value to the api client.
9c895d3
to
3faf55a
Compare
Looking a lot healthier this time around:
|
Looks good, thanks! |
* Update sqladmin api Pull in updates to the generated sqladmin api and update callers for the change in the StorageAutoResize setting * Add support for availability_type setting Allow specifying ZONAL or REGIONAL to allow for PostgreSQL HA setup. * vendor: update sqladmin/v1beta4 * Test setting AvailabilityType for PostgreSQL Add tests that cover the creation of a Postgres database with AvailabilityType set to REGIONAL, and correct some small issues that were preventing compilation. * Fix breaking change w/ disk_autoresize in cloudsql googleapis/google-api-go-client@95e5582 The cloudsql admin client changed the way it handles StorageAutoResize as a parameter, in order to be more explicit about when the server has ommitted the field. This changed the type from being bool to *bool, and we need to modify provider code so that we supply the right value to the api client.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Hey all,
This change continues on from #695 to address the review comments there and finish off the high availability support.
The only changes from #695 are the addition of an integration test and some fixing up of the sqladmin package. Also added some comments to clarify that the 1st Gen instances will required diff suppressing, and a default is provided server side when availability zone isn't given.
@katzj, I hope you don't mind but we really needed this at GoCardless a few months back!
Integration test output is: