Oj causing MultiJSON build to fail #53

Closed
sferik opened this Issue Dec 10, 2012 · 23 comments

Projects

None yet

2 participants

@sferik
Contributor
sferik commented Dec 10, 2012

For some reason, the MultiJSON's continusous integration broke 7 months ago and didn't get fixed until today. At some point over the past 7 month, a new error related to Oj emerged. It may very well be a bug in MultiJSON, not in Oj. I'm having trouble reproducing it locally. I thought you might have an idea about what the issue is. It does seem to be related to Oj, since the JRuby specs, which skip Oj, are passing. Arguably, we should not skip the Oj specs on JRuby, but that's a different issue.

Anyway, let me know if you have any ideas.

@ohler55
Owner
ohler55 commented Dec 10, 2012

Where can I find the test files? I did not see them in the multi_json/spec directory. I wonder if the problem is just the expected Exception.

@sferik
Contributor
sferik commented Dec 11, 2012

The specs are the tests. You can run them with the command:

bundle exec rake spec
@ohler55
Owner
ohler55 commented Dec 11, 2012

I forgot to do a pull. I see the file now.

@sferik
Contributor
sferik commented Dec 11, 2012

I thought we set the correct exception in intridea/multi_json@7d90453 but maybe that changed.

@ohler55
Owner
ohler55 commented Dec 11, 2012

hmm, I just ran the tests to see if I could find out why the ParseError was not matched and the tests ran clean. I wonder what is different on Travis.

By the way, you can still run the tests for JRuby. They should be fine. I don't think the bug I uncovered is relevant to the multi_json adapter.

@ohler55
Owner
ohler55 commented Dec 11, 2012

Line numbers are all off on travis as well. Not very helpful. Maybe it is a Linux related difference. I will not have access to my Ubuntu box for a while. Are you able to test on Linux?

@sferik
Contributor
sferik commented Dec 11, 2012

I'll re-enable the JRuby tests as soon as this issue is resolved (since the build will be failing anyway until then).

The specs all pass on my Mac, both under OS X and Linux using Vagrant. Have you ever tried Vagrant? It requires Oracle VM VirtualBox. I've found it the easiest way to get a Linux environment up and running on my Mac. You might want to give it a try. Maybe I need to use a different version of Linux. The one major difference between my Vagrant box and Travis is that Travis uses 32-bit Ubuntu 12.04 and I'm using the 64-bit version.

@ohler55
Owner
ohler55 commented Dec 11, 2012

My Ubuntu machine is set up as a 64 server as well. Odd that we get the same results on all Ruby versions. Would it be possible to insert a puts() and another rescue for Exception to find out what class travis is getting?

@sferik
Contributor
sferik commented Dec 11, 2012

Feel free to fork the repo, add whatever debugging output you want, and setup your fork to build on Travis. Unfortunately, I can't add you as a collaborator on the multi_json repo since I am not an admin.

@ohler55
Owner
ohler55 commented Dec 11, 2012

okay. It might take a couple of days but I will see what I can do on the road.

@sferik
Contributor
sferik commented Dec 11, 2012

Thanks Peter. Again, I suspect this is a bug in MultiJSON, not Oj. I really appreciate your help tracking it down. No big rush.

@ohler55
Owner
ohler55 commented Dec 11, 2012

I'm having trouble getting travis to pick up my fork but in the mean time. You might want to change line 48 in multi_json.rb to the following to get rid of the variable not defined warning.

  return @adapter if instance_variable_defined?(:@adapter) && @adapter
@ohler55
Owner
ohler55 commented Dec 11, 2012

Travis is coming out clean for the Oj errors for me.

https://travis-ci.org/ohler55/multi_json

@sferik
Contributor
sferik commented Dec 11, 2012

Very strange. I just restarted the build: https://travis-ci.org/intridea/multi_json/builds/1200931

@sferik
Contributor
sferik commented Dec 11, 2012

Still failing. Is it possible that adding this line fixed it?

rescue Exception => e

If so, it's strange the following line isn't being executed:

puts "*** #{e.class}: #{e.message}"
@ohler55
Owner
ohler55 commented Dec 11, 2012

I took it out and it still works. Too strange.

@ohler55
Owner
ohler55 commented Dec 11, 2012

I noticed the jruby tests are failing for me and not for you as well.

@ohler55
Owner
ohler55 commented Dec 11, 2012

I wonder if travis is building a different branch for you.

@sferik
Contributor
sferik commented Dec 11, 2012

Yeah, we basically have reverse build matrices. Everything that's passing for me is failing for you and vice versa.

@sferik
Contributor
sferik commented Dec 11, 2012

Oh, strange, it looks like Travis is building an 8-month-old ref: intridea/multi_json@471b556

@ohler55
Owner
ohler55 commented Dec 11, 2012

Problem solved. :-)

@sferik sferik closed this Dec 11, 2012
@sferik
Contributor
sferik commented Dec 11, 2012

Thanks for your help. I should have realized it was building old code.

@ohler55
Owner
ohler55 commented Dec 11, 2012

Glad to be of help.

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