wandb / terraform-google-wandb

A Terraform module for deploying Weights & Biases on GCP.
Apache License 2.0
12 stars 6 forks source link

fix: Update mysql version #47

Closed flamarion closed 1 year ago

flamarion commented 1 year ago

The module defaults the MySQL version to the 8_0_29, which is not supported by GCP anymore, and during the deployment, the following error comes up.

│ Error: Error, failed to create instance tf-perms-gcp-actual-mastiff: googleapi: Error 400: Invalid request: Database version (MYSQL_8_0_29) is deprecated.., invalid

The current default version for the 8_0 is the 0_0_26.

https://cloud.google.com/sql/docs/mysql/db-versions

The idea is to test and validate the downtime time to upgrade the DB for the next minor version, 8_0_30, considering that it will cause downtime according to the documentation.

https://cloud.google.com/sql/docs/mysql/upgrade-minor-db-version#minor-ver-upgrade

the instance is restarted during the operation, which causes downtime.

From Terraform perspective, this is a change in place, but there's downtime as stated in the documentation.

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.wandb.module.database.google_sql_database_instance.default will be updated in-place
  ~ resource "google_sql_database_instance" "default" {
      ~ database_version               = "MYSQL_8_0_28" -> "MYSQL_8_0_30"
        id                             = "tf-perms-gcp-novel-hound"
        name                           = "tf-perms-gcp-novel-hound"
        # (13 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
jsbroks commented 1 year ago
  1. Migration list does not include all support versions
  2. We should generally put the bumping of versions and changing of validation in 2 different prs
flamarion commented 1 year ago

If we merge like this and update the module version in the deployer, it will trigger the upgrade immediately. I will put this on hold for now and discuss with @jsbroks the potential implementation of maintenance_version and available_maintenance_versions. With these setup I think we can let GCP do the work for us in the maintenance window.

jsbroks commented 1 year ago

We can merge this

flamarion commented 1 year ago

It was closed as requested.

jsbroks commented 1 year ago

No need to close the pr, you have other changes worth merging

jsbroks commented 1 year ago

This PR is included in version 1.13.1 :tada: