-
Notifications
You must be signed in to change notification settings - Fork 22
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
Undefined method `type' for nil:NilClass #209
Comments
@mherasymiv-blackbird that's a really huge leap - 1.3.0 is more than four years old. I might need to see the Avro schema you're using to figure out what's going on. In the meantime, do you think you can try a binary version search to pinpoint what version this started breaking? |
@dorner Sure, here it is: https://github.com/wishabi/feedel/blob/a556166b9d5e7fdb7f303eb31e98aad31d32d7be/app/schemas/com/flipp/fadmin/FeedItems.avsc |
@mherasymiv-blackbird hence "binary search" :) You go halfway between the version that works and the one that doesn't. If it works, you go halfway in the second half, and if it doesn't, you go halfway in the first half, till you get to the one where the breakage was introduced. |
@dorner yep yep, I'll try to check more. |
From what I can tell it looks like you're passing a hash key for one of these records that doesn't exist in the actual schema. Maybe 1.3.0 let it pass, but newer versions do more validation. The schema is enormous, so I wouldn't be able to tell just by looking. If you run the code with a debugger and put a conditional breakpoint on that line ( |
@dorner you were right. Undefined method 'type' for nil:NilClass error occured for case when record key didn't exist in the actual schema. Seems your suggestion that old versions would let it pass, but newer versions have more validation is true. I fixed it by updating the schema to actual payload sent, but I have also created PR to update |
After upgrading
deimos-ruby
from1.3.0-beta5
to1.23.0
version in scope of Ruby upgrade we started getting an errorBacktrace:
Payload:
Gemfile.lock
The text was updated successfully, but these errors were encountered: