Skip to content

Migrate data_source_google_compute_instance_serial_port.go data source to use direct HTTP rather than a client library - #18467

Draft
GitOleksandrBokov wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
GitOleksandrBokov:data_source_google_compute_instance_serial_port-migration
Draft

Migrate data_source_google_compute_instance_serial_port.go data source to use direct HTTP rather than a client library#18467
GitOleksandrBokov wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
GitOleksandrBokov:data_source_google_compute_instance_serial_port-migration

Conversation

@GitOleksandrBokov

Copy link
Copy Markdown
Contributor

Part of the ongoing migration of handwritten compute files from the Apiary client library to direct HTTP calls (transport_tpg.SendRequest). Same pattern as #18444 and the merged data source migrations #17090 / #17117.

  • Replaces NewClient(...).Instances.GetSerialPortOutput(project, zone, instance).Port(port).Do() with GET projects/{project}/zones/{zone}/instances/{instance}/serialPort?port=N via transport_tpg.SendRequest + transport_tpg.AddQueryParams.
  • Error handling is unchanged: the call had no 404 handler before and still returns the raw error.
  • No schema, test, or documentation changes. The recorded VCR cassette stays replay-compatible: after the matcher strips alt/prettyPrint, both the old and the new request reduce to the same URL with port=N.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

compute: migrated `google_compute_instance_serial_port` data source to use direct HTTP rather than a client library

@modular-magician

modular-magician commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 18 insertions(+), 4 deletions(-)
google-beta provider View Diff 1 file changed, 18 insertions(+), 4 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
1555 1458 95 2
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeSecurityPolicy_withPreconfiguredWafConfig

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccComputeInstanceFromMachineImage_diffProject
❌ Error · Log - TestAccComputeSecurityPolicy_withPreconfiguredWafConfig

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. 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 recording VCR build log or the debug logs folder for detailed results.

@GitOleksandrBokov VCR tests complete for 3d84cb7!

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.

2 participants