Lock solidus_core.gemspec to ransack '< 4.2'#5812
Merged
kennyadsl merged 2 commits intosolidusio:mainfrom Aug 8, 2024
Merged
Conversation
3 tasks
kennyadsl
approved these changes
Aug 7, 2024
jarednorman
approved these changes
Aug 7, 2024
Member
jarednorman
left a comment
There was a problem hiding this comment.
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. |
Member
|
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 |
This was referenced Aug 27, 2024
Member
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: