-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix edition downgrade failure for an ENTERPRISE_PLUS instance with da… #12289
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
Fix edition downgrade failure for an ENTERPRISE_PLUS instance with da… #12289
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 104 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
@GoogleCloudPlatform/terraform-team @rileykarson This PR has been waiting for review for 1 week. Please take a look! Use the label |
GoogleCloudPlatform#12289) Co-authored-by: Sarthak Tandon <[email protected]>
GoogleCloudPlatform#12289) Co-authored-by: Sarthak Tandon <[email protected]>
Recently there was an API change to enable data cache by default for
ENTERPRISE_PLUS
edition (both MySQL and Postgres) instances. Whendata_cache_config
was not acomputed
attribute this resulted in acceptance test failures that were fixed in #12096.Now that
data_cache_config
is computed, it stays in the resource state after a downgrade even thoughdata_cache_config
is cleared from the instance metadata. This is a consequence of performing a PATCH (for edition upgrade / downgrade) followed by an UPDATE while ignoring the change in CloudSQL instance settings from the PATCH operation. The downgrade implicitly unsets the data cache config in the API as it is not allowed to be used withENTERPRISE
edition.This PR fixes this issue (edition downgrade failure for an
ENTERPRISE_PLUS
instance with data cache enabled) by persisting thedata_cache_config
received after the PATCH operation for edition upgrade / downgrade. Also fixes hashicorp/terraform-provider-google#20010 asTestAccSqlDatabaseInstance_Edition_Downgrade
can now run.b/375381759
I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)