-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix: make DefaultMatcher strict #98
Conversation
Merged, thanks! |
@dnaeon as this is now, it is definitely safe, but I bumped into a corner case today, that you may want to consider updating. Some libraries set the user agent header with things like GOOS and GOARCH, which means that, the fixture would have for example linux/amd64 from one machine, and the build would fail on another machine which is darwin/arm64 for example. It should be safe-ish to ignore the user agent in the default case:
Maybe we could have this as some sort of option? Safe by default, but trivial to tweak? WDYT? |
Hey @fornellas-udemy , I'm okay with adding such functionality, however I don't have spare time these days to actually work on it, but would be happy to review any proposed changes. Thanks! |
NP, I'll cook a PR then, TY. |
It looks like this change (and/or #99) breaks existing tests, would it be possible to make this stricter mode optional, and maybe later consider making it the default in a future major? We have found that updating from 3.2.0 to 3.2.1 (elastic/elastic-package#2001) breaks all our tests that make use of go-vcr, what is unexpected for a patch version. Regenerating all our recorded interactions would be burdensome. Apart of that there are header fields or part of bodies that may change between executions, for example the multipart writer in the Go stdlib includes randomly generated boundaries. |
Thanks @dnaeon for the quick answer, let me know if we can help testing the new release, vcr has helped a lot improving the reliability and speed of our builds! |
Hum... @jsoriano it looks like this may be another case to extend on #99, as I can see how this logic would be reusable across various projects. |
Hey @fornellas-udemy and @jsoriano , I've just pushed the |
@dnaeon I see you changed v4 to make heavy use of the Is this design something you're strongly attached to, or are you open to exploring options? |
Hey @fornellas-udemy , Perhaps we can open up a separate issue and discuss this as part of the Thanks! |
Ditto.
Closes #97.