Skip to content

transport: add Resource in ListCallOptions for refreshing resourceData in listPages#17543

Open
BBBmau wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
BBBmau:fresh-tempData-list-pages
Open

transport: add Resource in ListCallOptions for refreshing resourceData in listPages#17543
BBBmau wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
BBBmau:fresh-tempData-list-pages

Conversation

@BBBmau
Copy link
Copy Markdown
Collaborator

@BBBmau BBBmau commented May 13, 2026

Release Note Template for Downstream PRs (will be copied)

When reviewing the following PR:

we run into an issue where the flatteners produced on the target handwritten resource do not overwrite all fields leading to failures on tests and the need to manually integrate the list call on the list resource itself instead of relying on the existing ListPages.

Resolving this would be introducing a refresh of the resourceData for every item that's in the list method response.

each item contains the seedResourceData which contains the list configure values that are set prior to the listPages call.

a new field in ListCallOptions is necessary in order to call the resource schema:

			seedState := opt.TempData.State() <-- new
			for _, item := range items {
				itemMap, ok := item.(map[string]interface{})
				if !ok {
					return fmt.Errorf("expected item to be map[string]interface{}, got %T", item)
				}

				itemResourceData := opt.Resource.Data(seedState) <-- new
				if err := opt.Flattener(itemMap, itemResourceData, opt.Config); err != nil {
					return fmt.Errorf("Error flattening instance: %s", err)
				}
				if err := opt.Callback(itemResourceData); err != nil {

See Write release notes for guidance.


@BBBmau BBBmau requested a review from c2thorn May 13, 2026 18:55
@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 13, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
google-beta provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
terraform-google-conversion View Diff 1 file changed, 7 insertions(+), 4 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6424 5753 658 13
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 13 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccComputeInstanceFromTemplate_DiskForceAttach
  • TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccEphemeralServiceAccountKey_create
  • TestAccEphemeralServiceAccountKey_upload
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccProjectIamMemberRemove_memberInMultipleBindings
✅ Log ❌ Error · Log TestAccEphemeralServiceAccountKey_upload
❌ Error · Log - TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
❌ Error · Log - TestAccCloudRunService_cloudRunServiceGpuExample
❌ Error · Log - TestAccComputeInstanceFromTemplate_DiskForceAttach
❌ Error · Log - TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccEphemeralServiceAccountKey_create
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the build log or the debug logs folder for detailed results.

@BBBmau, @c2thorn VCR tests complete for 987d800!

@tavasyag
Copy link
Copy Markdown
Contributor

Would simplify Storage Bucket PR
https://github.com/GoogleCloudPlatform/magic-modules/pull/17500/changes#diff-a683cad3f887ca05289be3e1d28396b7543395477fcb4d5fb5efe41757c6779fR147-R178

to this:

return transport_tpg.ListPages(transport_tpg.ListPagesOptions{
		Config:         config,
		TempData:       d,
		Resource:       ResourceStorageBucket(),
		ListURL:        url,
		BillingProject: billingProject,
		UserAgent:      userAgent,
		Flattener:      flattenStorageBucketListItem,
		Callback:       callback,
	})
}

@BBBmau
Copy link
Copy Markdown
Collaborator Author

BBBmau commented May 14, 2026

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
google-beta provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
terraform-google-conversion View Diff 1 file changed, 7 insertions(+), 4 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6427 5716 658 53
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 53 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccBigqueryDatasetIamBinding
  • TestAccBigqueryReservationReservationAssignment_bareNameWithoutLocation
  • TestAccCESApp_update
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccComputeAutoscaler_autoscalerBasicExample
  • TestAccComputeAutoscaler_autoscalerSingleInstanceExample
  • TestAccComputeAutoscaler_multicondition
  • TestAccComputeAutoscaler_scaleDownControl
  • TestAccComputeAutoscaler_scaleInControl
  • TestAccComputeAutoscaler_scaleInControlFixed
  • TestAccComputeAutoscaler_scalingSchedule
  • TestAccComputeAutoscaler_update
  • TestAccComputeForwardingRule_forwardingRuleBasicExample
  • TestAccComputeForwardingRule_forwardingRulePscTargetUpdateRecreate
  • TestAccComputeForwardingRule_ip
  • TestAccComputeForwardingRule_networkTier
  • TestAccComputeForwardingRule_serviceDirectoryRegistrations
  • TestAccComputeForwardingRule_update
  • TestAccComputeInstanceFromTemplate_DiskForceAttach
  • TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
  • TestAccComputeRegionAutoscaler_scaleDownControl
  • TestAccComputeRegionAutoscaler_scaleInControl
  • TestAccComputeRegionAutoscaler_scalingSchedule
  • TestAccComputeRegionAutoscaler_update
  • TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
  • TestAccComputeTargetPool_update
  • TestAccComputeTargetPool_withSecurityPolicy
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataSourceGoogleComputeInstanceGroupManager
  • TestAccDataSourceGoogleComputeRegionInstanceGroupManager
  • TestAccDataSourceGoogleForwardingRule
  • TestAccDataSourceGoogleForwardingRules
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccEphemeralServiceAccountKey_create
  • TestAccEphemeralServiceAccountKey_upload
  • TestAccInstanceGroupManager_autoHealingPolicies
  • TestAccInstanceGroupManager_basic
  • TestAccInstanceGroupManager_self_link_unique
  • TestAccInstanceGroupManager_stateful
  • TestAccInstanceGroupManager_update
  • TestAccInstanceGroupManager_waitForStatus
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccModelArmorTemplate_noTemplateMetadataNoDrift
  • TestAccModelArmorTemplate_removeTemplateMetadata
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccRegionInstanceGroupManager_autoHealingPolicies
  • TestAccRegionInstanceGroupManager_basic
  • TestAccRegionInstanceGroupManager_update
  • TestAccServiceAccount_basic

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccBigqueryDatasetIamBinding
✅ Log TestAccBigqueryReservationReservationAssignment_bareNameWithoutLocation
✅ Log TestAccCESApp_update
✅ Log TestAccComputeAutoscaler_autoscalerBasicExample
✅ Log TestAccComputeAutoscaler_autoscalerSingleInstanceExample
✅ Log TestAccComputeAutoscaler_multicondition
✅ Log TestAccComputeAutoscaler_scaleDownControl
✅ Log TestAccComputeAutoscaler_scaleInControl
✅ Log TestAccComputeAutoscaler_scaleInControlFixed
✅ Log TestAccComputeAutoscaler_scalingSchedule
✅ Log TestAccComputeAutoscaler_update
✅ Log TestAccComputeForwardingRule_forwardingRuleBasicExample
✅ Log TestAccComputeForwardingRule_forwardingRulePscTargetUpdateRecreate
✅ Log TestAccComputeForwardingRule_networkTier
✅ Log TestAccComputeForwardingRule_serviceDirectoryRegistrations
✅ Log TestAccComputeForwardingRule_update
✅ Log TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
✅ Log TestAccComputeRegionAutoscaler_scaleDownControl
✅ Log TestAccComputeRegionAutoscaler_scaleInControl
✅ Log TestAccComputeRegionAutoscaler_scalingSchedule
✅ Log TestAccComputeRegionAutoscaler_update
✅ Log TestAccComputeTargetPool_update
✅ Log TestAccComputeTargetPool_withSecurityPolicy
✅ Log TestAccDataSourceGoogleComputeInstanceGroupManager
✅ Log TestAccDataSourceGoogleComputeRegionInstanceGroupManager
✅ Log TestAccDataSourceGoogleForwardingRule
✅ Log TestAccDataSourceGoogleForwardingRules
✅ Log TestAccInstanceGroupManager_autoHealingPolicies
✅ Log TestAccInstanceGroupManager_basic
✅ Log TestAccInstanceGroupManager_self_link_unique
✅ Log TestAccInstanceGroupManager_stateful
✅ Log TestAccInstanceGroupManager_update
✅ Log TestAccInstanceGroupManager_waitForStatus
✅ Log TestAccModelArmorTemplate_noTemplateMetadataNoDrift
✅ Log TestAccModelArmorTemplate_removeTemplateMetadata
✅ Log TestAccRegionInstanceGroupManager_autoHealingPolicies
✅ Log TestAccRegionInstanceGroupManager_basic
✅ Log TestAccRegionInstanceGroupManager_update
✅ Log TestAccServiceAccount_basic
✅ Log ❌ Error · Log TestAccEphemeralServiceAccountKey_upload
✅ Log ❌ Error · Log TestAccProjectIamMemberRemove_memberInMultipleBindings
❌ Error · Log - TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
❌ Error · Log - TestAccCloudRunService_cloudRunServiceGpuExample
❌ Error · Log - TestAccComputeForwardingRule_ip
❌ Error · Log - TestAccComputeInstanceFromTemplate_DiskForceAttach
❌ Error · Log - TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccEphemeralServiceAccountKey_create
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the build log or the debug logs folder for detailed results.

@BBBmau, @c2thorn VCR tests complete for 987d800!

@BBBmau
Copy link
Copy Markdown
Collaborator Author

BBBmau commented May 14, 2026

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

modular-magician commented May 14, 2026

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
google-beta provider View Diff 2 files changed, 8 insertions(+), 4 deletions(-)
terraform-google-conversion View Diff 1 file changed, 7 insertions(+), 4 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
6430 5750 658 22
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 22 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
  • TestAccCloudRunService_cloudRunServiceGpuExample
  • TestAccComputeAutoscaler_autoscalerBasicExample
  • TestAccComputeAutoscaler_autoscalerSingleInstanceExample
  • TestAccComputeForwardingRule_ip
  • TestAccComputeInstanceFromTemplate_DiskForceAttach
  • TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
  • TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataformConfig_update
  • TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccEphemeralServiceAccountKey_create
  • TestAccEphemeralServiceAccountKey_upload
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccNetworkConnectivityDestination_networkConnectivityDestinationBasicExample
  • TestAccNetworkConnectivityDestination_update
  • TestAccNetworkConnectivityMulticloudDataTransferConfig_networkConnectivityMulticloudDataTransferConfigBasicExample
  • TestAccNetworkConnectivityMulticloudDataTransferConfig_update
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample

View the build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeAutoscaler_autoscalerBasicExample
✅ Log TestAccComputeAutoscaler_autoscalerSingleInstanceExample
✅ Log TestAccComputeRegionAutoscaler_regionAutoscalerBasicExample
✅ Log TestAccProjectIamMemberRemove_memberInMultipleBindings
✅ Log ❌ Error · Log TestAccDataformConfig_update
✅ Log ❌ Error · Log TestAccEphemeralServiceAccountKey_create
✅ Log ❌ Error · Log TestAccEphemeralServiceAccountKey_upload
❌ Error · Log - TestAccBeyondcorpAppConnection_beyondcorpAppConnectionBasicExample
❌ Error · Log - TestAccCloudRunService_cloudRunServiceGpuExample
❌ Error · Log - TestAccComputeForwardingRule_ip
❌ Error · Log - TestAccComputeInstanceFromTemplate_DiskForceAttach
❌ Error · Log - TestAccComputeSubnetwork_secondaryIpRanges_sendEmpty
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataformRepository_dataformRepositoryWithCloudsourceRepoAndSshExample
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccNetworkConnectivityDestination_networkConnectivityDestinationBasicExample
❌ Error · Log - TestAccNetworkConnectivityDestination_update
❌ Error · Log - TestAccNetworkConnectivityMulticloudDataTransferConfig_networkConnectivityMulticloudDataTransferConfigBasicExample
❌ Error · Log - TestAccNetworkConnectivityMulticloudDataTransferConfig_update
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the build log or the debug logs folder for detailed results.

@BBBmau, @c2thorn VCR tests complete for 987d800!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants