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

Upgrade to 1.18.0 version error #95

Closed
luciiii6 opened this issue Jan 5, 2023 · 2 comments
Closed

Upgrade to 1.18.0 version error #95

luciiii6 opened this issue Jan 5, 2023 · 2 comments

Comments

@luciiii6
Copy link

luciiii6 commented Jan 5, 2023

Hi, I am trying to upgrade the gem to the latest version (1.8.0) and ran into some problems. We are using ddtracerb and it is expecting to receive a hash instead of an array to write_multi function:

This is the error rescued and then raised by your code:

GraphQL::FragmentCache::WriteMultiError:
  undefined method 'keys' for ["graphql/ids/368d52c087dfcf3113a577315c45e3036b316410", {"data": "test"}]:Array

                    keys: hash.keys,
                              ^^^^^
/home/circleci/.rubygems/gems/graphql-fragment_cache-1.18.0/lib/graphql/fragment_cache/cacher.rb:52:in `rescue in block in batched_persist'

And this is the original error:

--- Caused by: ---
NoMethodError:
  undefined method `keys' for ["graphql/ids/368d52c087dfcf3113a577315c45e3036b316410", {"data":"test"}]:Array
  
                    keys: hash.keys,
                              ^^^^^
  /home/circleci/.rubygems/gems/ddtrace-1.8.0/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb:234:in `write_multi'

This is the code where it comes from: ddtrace code

Also the ruby version used is: 3.1.3

@DmitryTsepelev
Copy link
Owner

Hey @luciiii6! Looks like I made a stupid mistake and passed hash as *hash, here's a fix and I rolled out 1.18.1, please let me know if it helps 🙂

@luciiii6
Copy link
Author

luciiii6 commented Jan 6, 2023

Works like a charm, thank you for the fix! 😃

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

No branches or pull requests

2 participants