-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Lock solidus_core.gemspec to ransack '< 4.2' #5812
Lock solidus_core.gemspec to ransack '< 4.2' #5812
Conversation
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.
Looks good, though I'd love one or both of:
- a comment explaining the restriction
- a PR that reverts this change that explains when it should be merged
Failure: /spec/components/solidus_admin/ui/thumbnail/component_spec.rb:6 Error: /home/circleci/solidus/admin/spec/components/previews/solidus_admin/ui/thumbnail/component_preview/overview.html.erb:53: numbered parameter is already used in /home/circleci/solidus/admin/spec/components/previews/solidus_admin/ui/thumbnail/component_preview/overview.html.erb:52: outer block here Failure/Error: <% image = Spree::Image.new.tap { _1.define_singleton_method(:attachment) { attachment } } %> By replaing the second instance of numbered params, we can avoid this error with no behavioural or functional changes to the code. Interestingly though, it was only failing on 2 out of our 8 spec runs, and it did so consistently.
Solidus core's gemspec already required that ransack be '~> 4.0', but the latest version of ransack, v4.2.0, released July 10 2024, introduces a bug. The previous implementation was taking for granted that every predicate would respond to #value, which doesn't seem to be the case when the predicate is an instance of a Arel::SelectManager. This has already been flagged by @spaghetticode in his PR against ransack: activerecord-hackery/ransack#1468 Since there has been little movement on this PR since January, we should lock to a version that works for us since currently many of our product specs are failing. (eg. spec/models/spree/product_spec.rb:659) We can remove this lock once the PR is merged and once the above test (and the others that are failing) are able to pass in ransack v4.2.0 or subsequent versions.
c4d4b4c
to
1664d10
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5812 +/- ##
=======================================
Coverage 88.78% 88.78%
=======================================
Files 731 731
Lines 17057 17057
=======================================
Hits 15144 15144
Misses 1913 1913 ☔ View full report in Codecov by Sentry. |
Should have been backported to v4.3 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Solidus core's gemspec already required that ransack be '~> 4.0', but the latest version of ransack, v4.2.0, released July 10 2024, introduces a bug. The previous implementation was taking for granted that every predicate would respond to #value, which doesn't seem to be the case when the predicate is an instance of a Arel::SelectManager.
This has already been flagged by @spaghetticode in his PR against ransack: activerecord-hackery/ransack#1468
Since there has been little movement on this PR since January, we should lock to a version that works for us since currently many of our product specs are failing. (eg. spec/models/spree/product_spec.rb:659)
We can remove this lock once the PR is merged and once the above test (and the others that are failing) are able to pass in ransack v4.2.0 or subsequent versions.
Summary
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: