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

Migrate away from VCR gem #3228

Open
murny opened this issue Sep 15, 2023 · 0 comments
Open

Migrate away from VCR gem #3228

murny opened this issue Sep 15, 2023 · 0 comments

Comments

@murny
Copy link
Collaborator

murny commented Sep 15, 2023

VCR is a testing dependency for helping us mock APIs.

We are currently locked to version v5.0 of VCR since they changed their project's license from MIT to The Hippocratic License.

Since the wording of this license is intentionally vague, Matt believed this could cause potential legality issues with ERA and any research we host in our repository. His thoughts were captured here:
#1667

Being on an old version of VCR is causing some issues like crashing our test suite. There is workarounds for this, but it's not ideal.

We ulimtately need to migrate away from this gem and use something else.

VCR is just a nice wrapper around https://github.com/bblimke/webmock. Potentially, we can just use webmock instead?

VCR mainly just gives the pleasant functionality of "cassettes". Where you could just call the real API in our tests, which would save this call as a "cassette" mock. Then any future calls to the API would be intercepted and played off the "cassette" mock instead. Then in the future, you could just hit the real API again to update the "cassette" mock.

Ultimately, I doubt we ever updated our cassettes due to changes to an API. The APIs we consume are generally very stable and not known to change. We are basically just using VCR as an easy way to create our mocks instead of manually creating them in webmock.

But for the future we need to get away from VCR and webmock seems like the next best thing.

Related to: #3216

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

No branches or pull requests

1 participant