Skip to content

Tidy go-vcr usage#5330

Draft
theunrepentantgeek wants to merge 3 commits intomainfrom
improve/tidy-go-vcr
Draft

Tidy go-vcr usage#5330
theunrepentantgeek wants to merge 3 commits intomainfrom
improve/tidy-go-vcr

Conversation

@theunrepentantgeek
Copy link
Copy Markdown
Member

@theunrepentantgeek theunrepentantgeek commented Apr 23, 2026

What this PR does

Reduces the number of permitted replays of GET requests significantly, which help with faster test failures if/when things go wrong.

Also removes the now unused v3 of our internal vcr package, given that v4 appears reliable.

Closes #5282
Closes #5109

Special notes

We used to need effectively unlimited replays, now we seem to get by with far fewer.

How does this PR make you feel?

gif

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tidies the internal go-vcr integration used by ASO v2 tests by tightening replay behavior and removing the legacy v3 implementation now that v4 is considered stable.

Changes:

  • Reduce the allowed number of GET replays during cassette playback (faster failure when recordings diverge).
  • Remove the internal v2/internal/testcommon/vcr/v3 implementation and its associated tests/recording.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
v2/internal/testcommon/vcr/v4/replay_roundtripper.go Lowers the GET replay limit used by the v4 replay round-tripper.
v2/internal/testcommon/vcr/v3/tracking_roundtripper.go Removes legacy v3 tracking header round-tripper implementation.
v2/internal/testcommon/vcr/v3/error_translating_roundtripper.go Removes legacy v3 error translation wrapper.
v2/internal/testcommon/vcr/v3/replay_roundtripper.go Removes legacy v3 replay round-tripper implementation.
v2/internal/testcommon/vcr/v3/replay_roundtripper_test.go Removes legacy v3 replay round-tripper tests.
v2/internal/testcommon/vcr/v3/test_recorder.go Removes legacy v3 test recorder implementation.
v2/internal/testcommon/vcr/v3/test_recorder_test.go Removes legacy v3 test recorder tests.
v2/internal/testcommon/vcr/v3/recordings/TestRecorder_WhenRecordingAndRecordingExists_DoesPlayback.yaml Removes legacy v3 test cassette recording.

Comment thread v2/internal/testcommon/vcr/v4/replay_roundtripper.go
@theunrepentantgeek theunrepentantgeek self-assigned this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Remove unused vcr version Limit the number of GET replays during tests

2 participants