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

YAML 1.2 compliance possibly breaking VCR #648

Open
oliverbarnes opened this issue Sep 12, 2023 · 1 comment
Open

YAML 1.2 compliance possibly breaking VCR #648

oliverbarnes opened this issue Sep 12, 2023 · 1 comment

Comments

@oliverbarnes
Copy link

oliverbarnes commented Sep 12, 2023

This is an issue branching off from #613 (comment).

We're experimenting migrating a Rails app we have to latest JRuby (9.4.3.0), an app that has some large VCR fixtures.

Initially we hit the the code point limit issue that #613 lets us bypass, but after increasing the code point limit that the above PR let's us configure, we came across parsing errors like this one:

the leading empty lines contain more spaces (8) than the first non-empty line. while scanning a block scalar at line 32385 column 5
     # ./config/initializers/psych.rb:6:in `parse_stream'

(the initializer monkey patch is a hack while we can't get #647 to work on our end)

In this case, the fixture had several empty newlines in a multiline field, using a block scalar header like field: |+2.

After deleting that field from the yaml fixture altogether as part of troubleshooting, all fixtures get parsed and we're able to run Rspec specs again using VCR. But some of the specs that were previously passing now fail, with Webmock not recognizing the URIs for the requests recorded in the fixtures.

We suspect this might be happening due to YAML 1.2 not liking how the URIs are escaped, and we're still validating this. @headius asked me to create this issue so it can be tracked together with #642, which might also be related to YAML 1.2 compliance (see also jruby/jruby#7600 (comment))

I'll update this issue as we find out more about it, ideally with a test comparing the same use case with YAML 1.1 and YAML 1.2.

@oliverbarnes oliverbarnes changed the title YAML 1.2 breaking VCR YAML 1.2 compliance possibly breaking VCR Sep 12, 2023
@oliverbarnes
Copy link
Author

After some more digging, it seems that the URIs are in fact recognized, but VCR cassetes are "played" more times than the fixture recorded for. But we couldn't figure out why so far.

Unfortunately we won't have more time to look into this for now, as we're pausing our JRuby spike. If we get back to it, we'll try to continue investigating this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant