Skip to content

Add support for sending AIP-155 requestId query parameter#17259

Draft
wiktorn wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
wiktorn:send_request_id
Draft

Add support for sending AIP-155 requestId query parameter#17259
wiktorn wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
wiktorn:send_request_id

Conversation

@wiktorn
Copy link
Copy Markdown
Contributor

@wiktorn wiktorn commented Apr 23, 2026

AIP-155 provides idempotency guarantees for clients. This PR implements client-side part, so calls to Google APIs can leverage backend capabilites.

Currently, when a request is sent and a transient network occurs, retry mechanism will send second request. While this is not a major problem when running Get or Update operations, it is a problem when sending Create or Delete request (before Long Running Operation handle is returned).

When Create operation times out or errors out with transient network error and is retried, a second call will fail with the message that object already exists and this will fail the whole operation.

Similar situation is in case of Delete operation, though there the message is that object doesn't exists.

With this change, by sending the same RequestId identifier, we oblige backend to return the same message as for original request - hence providing client-side idempotency.

Release Note Template for Downstream PRs (will be copied)

No release notes, as this should not affect the users yet, this PR just provides the capability. There will be follow-up PRs, that enable this capability for specific resources.

Selected compute resources PR: #17262

@modular-magician
Copy link
Copy Markdown
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 ( 738 files changed, 11914 insertions(+), 10506 deletions(-))
google-beta provider: Diff ( 810 files changed, 13066 insertions(+), 11530 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 12 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Copy Markdown
Collaborator

Tests analytics

Total tests: 6343
Passed tests: 5674
Skipped tests: 652
Affected tests: 17

Click here to see the affected service packages

All service packages are affected

Action taken

Found 17 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample
  • TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCESApp_update
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample
  • TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccContainerCluster_updateVersion
  • TestAccContainerCluster_withAutopilotResourceManagerTags
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataformConfig_update
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccProjectIamPolicy_invalidMembers
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccDataformConfig_update [Debug log]
TestAccProjectIamPolicy_invalidMembers [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccApigeeOrganization_apigeeOrganizationCloudBasicDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccApigeeOrganization_apigeeOrganizationCloudFullDisableVpcPeeringTestExample [Error message] [Debug log]
TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample [Error message] [Debug log]
TestAccCESApp_update [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample [Error message] [Debug log]
TestAccCESTool_cesToolDataStoreToolEngineSourceBasicExample_update [Error message] [Debug log]
TestAccCloudRunService_cloudRunServiceGpuExample [Error message] [Debug log]
TestAccContainerCluster_updateVersion [Error message] [Debug log]
TestAccContainerCluster_withAutopilotResourceManagerTags [Error message] [Debug log]
TestAccContainerNodePool_withHostMaintenancePolicy [Error message] [Debug log]
TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample [Error message] [Debug log]
TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample [Error message] [Debug log]
TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample [Error message] [Debug log]
TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample [Error message] [Debug log]
TestAccPubsubSubscription_pubsubSubscriptionTagsExample [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

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.

2 participants