Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
upgrade task fixes
Damian Legawiec4f0999764784
diff --git a/spree/core/lib/spree/upgrades/5_4_to_5_5/manifest.yml b/spree/core/lib/spree/upgrades/5_4_to_5_5/manifest.ymlindex 0459f88a4f..5bf06a79e5 100644--- a/spree/core/lib/spree/upgrades/5_4_to_5_5/manifest.yml+++ b/spree/core/lib/spree/upgrades/5_4_to_5_5/manifest.yml@@ -41,3 +41,13 @@ steps:Until this runs, every product has store_id IS NULL and is invisibleto Product.for_store — admin lists, storefront catalog, and searchindexer all return empty.++ - id: reindex+ name: "Reindex products against the configured search provider"+ task: "spree:search:reindex"+ notes: |+ No-op for the default Database provider. For Meilisearch (or any other+ external search provider), this is required after the channels upgrade+ because products only become visible to Product.for_store once they+ have a store_id — reindexing before the channels step would index 0+ products. Must run AFTER `channels`.diff --git a/spree/core/lib/tasks/upgrade.rake b/spree/core/lib/tasks/upgrade.rakeindex 919cf14f2e..174d3a30fb 100644--- a/spree/core/lib/tasks/upgrade.rake+++ b/spree/core/lib/tasks/upgrade.rake@@ -117,7 +117,10 @@ module Spreeprint_manifest_header(manifest)manifest['steps'].each_with_index do |step, i|print_step(step, i + 1, manifest['steps'].size)- invoke(step) unless dry_run+ unless dry_run+ invoke(step)+ print_step_complete(step)+ endendend@@ -145,7 +148,10 @@ module Spreemanifest, step = matches.firstprint_manifest_header(manifest)print_step(step, 1, 1)- invoke(step) unless dry_run+ unless dry_run+ invoke(step)+ print_step_complete(step)+ endputsputs dry_run ? ' (dry run — nothing executed)' : " Step '#{step_id}' complete."@@ -167,6 +173,10 @@ module Spreestep['notes'].each_line { |line| puts " #{line.chomp}" }end+ def print_step_complete(step)+ puts " ✓ #{step['task']} done."+ end+def invoke(step)task = step.fetch('task')puts " Running #{task}..."