Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update recorder to skip saving 429 responses #382

Merged
merged 3 commits into from Oct 26, 2022

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Oct 25, 2022

🔧 Changes

In this PR we're testing out the changes introduced within the go-vcr pkg that allow us to skip saving on disk certain interactions like 429s.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@sergiught sergiught self-assigned this Oct 25, 2022
i.Request.Host = strings.Replace(i.Request.Host, domain, RecordingsDomain, -1)
i.Request.URL = strings.Replace(i.Request.URL, domain, RecordingsDomain, -1)

i.Response.Duration = time.Millisecond
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't really need to set the duration to 1ms as we already set SkipRequestLatency: true on the recorder options.

@codecov-commenter
Copy link

Codecov Report

Base: 86.74% // Head: 86.74% // No change to project coverage 👍

Coverage data is based on head (00f675e) compared to base (73e8358).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #382   +/-   ##
=======================================
  Coverage   86.74%   86.74%           
=======================================
  Files          41       41           
  Lines        8730     8730           
=======================================
  Hits         7573     7573           
  Misses        890      890           
  Partials      267      267           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sergiught sergiught marked this pull request as ready for review October 26, 2022 08:05
@sergiught sergiught requested a review from a team as a code owner October 26, 2022 08:05
@sergiught sergiught merged commit 784a201 into main Oct 26, 2022
@sergiught sergiught deleted the patch/go-vcr-bump-skip-429 branch October 26, 2022 11:38
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.

None yet

3 participants