-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
build, test: upgrade to vcrpy>=5 & refresh broken cassettes #2519
Conversation
I called it on the "new and exciting error" happening in CI, didn't I? Python 3.10 and 3.11 passed, but got canceled by 3.8 failing with an error about gzip this time… 3.9 didn't get far enough along to tell if the same tests would fail. It's still related to urllib3 or requests, with zlib this time as the third suspect:
Couldn't say why this might happen just yet, but this Stack Overflow answer seems relevant. The most common reason for this error would be trying to decode data that has no header ( @SnoopJ can I ask you to use your |
I see this failure locally for |
Interim update from IRC: @SnoopJ has dug into this a bit more (❤️) and ruled out the remote server doing funky stuff. We now suspect that the error is just a symptom of something else. For example, I noticed in one of the YAML diffs for this PR ( |
Now 99% certain it's due to this dependency change that's still being shipped with vcrpy 5.x. In fact, the I don't believe we can force pip to install |
Tested the current
From there I ran the full I think it's time to take this upstream and see if |
Hoping for some response to kevin1024/vcrpy#777 because oy, the kludge to force-upgrade |
This is *probably* the ideal solution to my issues with certain VCR cassettes failing locally, since we were on vcrpy 2.x for quite a long time. Skipping two whole major versions probably isn't ideal, but I like this solution because: * No more pinning urllib3 at runtime to make a dev requirement happy * No more snarky incompatibility warning from pip that types-requests wants urllib3 2.x but we have 1.x (seen in CI logs) * No more weird BrotliDecoderDecompressStream exceptions in my local environment (which didn't happen in CI) Note that this commit only updates half a dozen YAML cassettes for two plugins whose tests *failed* after upgrading vcrpy. Working cassettes have been left untouched. vcrpy 5 is currently installed from a fork that removes the upstream version cap on urllib3<2 for Python < 3.10, as it seems cassettes are often incompatible across major urllib3 versions. (Cassettes that would work when tests ran under urllib3 1.x raised exceptions under urllib3 2.x, and vice versa.) Upstream, the vcrpy maintainers have been totally silent since I opened a pull request suggesting the removal of this version cap. After two weeks without any acknowledgement whatsoever, I chose to create a fork within Sopel's GitHub organization specifically for use with our CI and dev-environment setup. This should be more or less fine, since only CI and maintainers are likely to bother installing the dev-requirements. Packaged releases don't include them, so we can move pretty quickly to get current again whenever the vcrpy maintainers accept the change (or if they do). The "internal" fork also guards against deleting my personal fork. (When a patch I submitted is merged, I habitually delete my fork if I don't foresee making further contributions to that project.)
73fe722
to
3288fe7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I'm all for it.
This is probably the ideal solution to my issues with certain VCR cassettes failing locally, since we were on vcrpy 2.x for quite a long time. The error I saw on my local environment went away after upgrading vcrpy (to 5.x) & urllib3 (to 2.x).
Skipping two whole major versions of vcrpy probably isn't ideal, but I like this solution because:
Note that this commit only updates half a dozen YAML cassettes for two plugins whose tests failed after upgrading vcrpy. Working cassettes have been left untouched.
Checklist
make qa
(runsmake lint
andmake test
)Notes
I'm sort of expecting some new and exciting error to happen in CI that I don't see locally, because that's just what happens when I start messing with anything related to VCR.
All the same, I figured I should probably try to see if updating some dependencies would fix that weird Brotli error I ran into locally while creating new cassettes for #2512 (which worked in CI). Needing to update some cassettes for this patch isn't a huge surprise, since I expect some degree of change in cassette behavior across major versions of the VCR library.