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

[v4.3] Lock solidus_core.gemspec to ransack '< 4.2' #5839

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Aug 27, 2024

Backport

This will backport the following commits from main to v4.3:

Questions ?

Please refer to the Backport tool documentation

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.

(cherry picked from commit 7176948)
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.

(cherry picked from commit 1664d10)

# Conflicts:
#	core/solidus_core.gemspec
@tvdeyen tvdeyen requested a review from a team as a code owner August 27, 2024 13:34
@tvdeyen tvdeyen added backport-v4.3 Backport this pull-request to v4.3 changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin labels Aug 27, 2024
@tvdeyen
Copy link
Member Author

tvdeyen commented Aug 27, 2024

Installer specs will be fixed by solidusio/solidus_starter_frontend#371

@tvdeyen tvdeyen merged commit ab5da94 into solidusio:v4.3 Aug 27, 2024
16 of 17 checks passed
@tvdeyen tvdeyen deleted the backport/v4.3/pr-5812 branch August 27, 2024 14:44
@mamhoff
Copy link
Contributor

mamhoff commented Dec 6, 2024

This also needs a new backport #6016

@tvdeyen tvdeyen added backport-v4.3 Backport this pull-request to v4.3 and removed backport-v4.3 Backport this pull-request to v4.3 labels Dec 6, 2024
@MadelineCollier
Copy link
Contributor

MadelineCollier commented Dec 6, 2024

This also needs a new backport #6016

@mamhoff Is the backport still required in light of this fix: #5853 ?

@mamhoff
Copy link
Contributor

mamhoff commented Dec 6, 2024

Possibly not! I just collected all PRs that might've been affected by that bug in the GitHub actions config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v4.3 Backport this pull-request to v4.3 changelog:solidus_admin changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants