Skip to content

Conversation

@rileykarson
Copy link
Member

Fixes hashicorp/terraform-provider-google#24434

Because ForceSendFields is not set, this nulls dataDiskSizeGb in the JSON request. The problem is that this is a PUT API, and we were sending a full resource body and some validation interprets null as different than the user-defined value triggering a false positive. I don't think the value will ever actually get updated, limiting the impact of this change, but there are definitely APIs where that could have happened (we'd fail more tests if we introduced a regression like that, at least!).

Error: Error, failed to update instance settings for : googleapi: Error 400: Invalid request: Cannot enable read pool and update instance settings in the same request. Perform the changes in two separate updates.., invalid

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

sql: fixed an issue where `dataDiskSize` was unintentionally null instead of set to the current value in API requests, triggering unrelated errors

@rileykarson rileykarson requested a review from trodge October 21, 2025 23:01
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 131
Passed tests: 64
Skipped tests: 26
Affected tests: 41

Click here to see the affected service packages
  • sql

Action taken

Found 41 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSQLDatabaseInstance_sqlMysqlDataCacheConfig
  • TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize
  • TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize
  • TestAccSqlDatabaseInstance_Edition_Downgrade
  • TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_FinalBackupConfig
  • TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess
  • TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer
  • TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess
  • TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess
  • TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess
  • TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade
  • TestAccSqlDatabaseInstance_RetainBackupOnDelete
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate
  • TestAccSqlDatabaseInstance_SwitchoverSuccess
  • TestAccSqlDatabaseInstance_activationPolicy
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_basic_with_user_labels
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_hyperdisk
  • TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_updateMCPEnabled
  • TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment
  • TestAccSqlDatabase_instanceWithActivationPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSQLDatabaseInstance_sqlMysqlDataCacheConfig [Debug log]
TestAccSQLDatabaseInstance_sqlPostgresDataCacheConfig [Debug log]
TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithDiskSize [Debug log]
TestAccSqlDatabaseInstance_DiskSizeAutoResizeWithoutDiskSize [Debug log]
TestAccSqlDatabaseInstance_Edition_Downgrade [Debug log]
TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration [Debug log]
TestAccSqlDatabaseInstance_FinalBackupConfig [Debug log]
TestAccSqlDatabaseInstance_MysqlReadPoolAutoScaleEnableDisableSuccess [Debug log]
TestAccSqlDatabaseInstance_MysqlSwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled [Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolAutoScaleChangeNodeCount [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolScaleOutSuccess [Debug log]
TestAccSqlDatabaseInstance_PostgresReadPoolScaleUpSuccess [Debug log]
TestAccSqlDatabaseInstance_PostgresSwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_Postgres_Edition_Upgrade [Debug log]
TestAccSqlDatabaseInstance_RetainBackupOnDelete [Debug log]
TestAccSqlDatabaseInstance_Smt [Debug log]
TestAccSqlDatabaseInstance_SqlServerTimezoneUpdate [Debug log]
TestAccSqlDatabaseInstance_SwitchoverSuccess [Debug log]
TestAccSqlDatabaseInstance_basicMSSQL [Debug log]
TestAccSqlDatabaseInstance_basic_with_user_labels [Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls [Debug log]
TestAccSqlDatabaseInstance_hyperdisk [Debug log]
TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection [Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled [Debug log]
TestAccSqlDatabaseInstance_settings_upgrade [Debug log]
TestAccSqlDatabaseInstance_updateMCPEnabled [Debug log]
TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled [Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject [Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddPscAutoConnections_thenRemovePscAutoConnections [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange [Debug log]
TestAccSqlDatabaseInstance_withPscEnabled_withNetworkAttachmentUri_thenRemoveNetworkAttachment [Debug log]
TestAccSqlDatabase_instanceWithActivationPolicy [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_EnableGoogleMlIntegration [Error message] [Debug log]
TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade [Error message] [Debug log]
TestAccSqlDatabaseInstance_activationPolicy [Error message] [Debug log]
TestAccSqlDatabaseInstance_authNets [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rileykarson
Copy link
Member Author

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 131
Passed tests: 101
Skipped tests: 26
Affected tests: 4

Click here to see the affected service packages
  • sql

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_activationPolicy
  • TestAccSqlDatabaseInstance_authNets

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccSqlDatabaseInstance_EnableGoogleMlIntegration [Debug log]
TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade [Debug log]
TestAccSqlDatabaseInstance_authNets [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_activationPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rileykarson
Copy link
Member Author

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 131
Passed tests: 104
Skipped tests: 26
Affected tests: 1

Click here to see the affected service packages
  • sql

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSqlDatabaseInstance_activationPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_activationPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rileykarson
Copy link
Member Author

/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 131
Passed tests: 104
Skipped tests: 26
Affected tests: 1

Click here to see the affected service packages
  • sql

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccSqlDatabaseInstance_activationPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccSqlDatabaseInstance_activationPolicy [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@rileykarson
Copy link
Member Author

rileykarson commented Oct 22, 2025

I'm gonna merge this through- I don't know why SQL isn't working for that test, but we're trading an error we can resolve that will fix nightlies too for an internal error that may get fixed OOB (and is also failing in nightlies in the same ways, so not caused here). It's possible that the old recording will work, too, but not sure.

@rileykarson rileykarson added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 8961bed Oct 22, 2025
26 of 27 checks passed
@rileykarson rileykarson deleted the rileykarson-patch-2 branch October 22, 2025 19:35
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 23, 2025
jkrish-c pushed a commit to jkrish-c/magic-modules that referenced this pull request Oct 24, 2025
akerekes pushed a commit to akerekes/magic-modules that referenced this pull request Oct 29, 2025
bcreddy-gcp pushed a commit to bcreddy-gcp/magic-modules that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing test(s): TestAccSqlDatabaseInstance_MysqlReadPoolEnableDisableSuccess

3 participants