[LRUG] VCR caches
Samuel Joseph
tansaku at gmail.com
Tue Sep 18 02:32:12 PDT 2018
Hi James,
On 11/09/2018 11:07, James Adam wrote:
> On 11 Sep 2018, at 10:07, Samuel Joseph <tansaku at gmail.com
> <mailto:tansaku at gmail.com>> wrote:
>>
>> I have two concerns
>>
>> 1) new developers onboarding often get snarled up in the caching and
>> the files generated
>
> I tend to consider the generated YAML files as black boxes — it’s hard
> to predict their contents or make much sense of them until you’re
> quite experienced.
Yes, that makes sense. I don't think the problem is the new developers
looking inside the files so much as not being sure about whether to add
the files, leave them out, .gitignore them or what. And new cached files
seem to get generated when tests fail on a developers machine (for
whatever reason) and then a slightly different set of network
interactions follows. Or more specifically when a developer is working
on a new feature and adding to the tests and then seeing a load of new
cassettes and not being sure what to do, or even getting confused at a
given point about whether the tests are hitting the network are not.
>
>> 2) the cached recordings are gradually getting further and further
>> out of date - could we automate their refreshing?
>
> VCR _can_ be configured to automatically re-record after a fixed
> period of time, would that help?
> https://relishapp.com/vcr/vcr/v/3-0-3/docs/cassettes/automatic-re-recording
>
I didn't know that - that's very helpful thankyou!
Having read the documentation it sounds like that would just throw out
the cached files at a point that one might easily forget about and have
to cope with the change while in the middle of working on another
feature. I was really hoping that there might be a dependabot style
system that would submit a pull request once a month with the
re-recorded cache files ... I wonder how hard that would be to create ...?
Many thanks again
Best, Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20180918/b9ee952c/attachment-0004.html>
More information about the Chat
mailing list