Progress report for Spree upgrade

This thread will serve as a progress report for the Spree upgrade.
Continued from Spree Upgrade: Purpose and Strategy

Step 1

Based off 432d129.
This step consists of biting off the first 133 commits out of 2308 needed to reach 2-0-stable.

Time thus far: 24 hours (includes project research and planning)

Failing specs remaining: 4

Update 16-9-2016:
Failing specs: 0

Testing:

Merged: 18-11-2016

Step 2

Find the number of the previous commit:

gl 2-0-stable~2175
# 432d129

Get SHA of next commit to base off:

gl 2-0-stable~2075
# 46e60c9

Progress

  • helpers :white_check_mark:
  • jobs :white_check_mark:
  • lib :white_check_mark:
  • performance :white_check_mark:
  • mailers :white_check_mark:
  • models :white_check_mark:
  • serializers :white_check_mark:
  • javascripts :white_check_mark:
  • controllers (customer) :white_check_mark:
  • controllers (admin) :white_check_mark:
  • views :white_check_mark:
  • requests :white_check_mark:
  • features (customer) :white_check_mark:
  • features (admin) :white_check_mark:

All specs green 4-11-2016
Merged: Due to the testing effort required, we’ll merge every 5 steps.

Notes

  • Tracking down permission errors, a pry in cancan/lib/cancan/controller_additions.rb authorize! was helpful.
  • Modified Spree’s ResourceController#load_resource to authorize with symbols, not strings:
    • authorize! params[:action].to_sym, @object
  • Upgraded jquery (via jquery-rails) to 1.9, to fix compatibility with ng-tags-input.

Step 3 and beyond

See below.

Step 1 - 21

100 commits each

Step 22

Last 75 commits
Party!

Step 23

Upgrade directly to 2.1

Step 24

Upgrade directly to 2.2

4 Likes

Step 3

Get SHA of next commit to base off:

gco -b spree-upgrade-step-3
gl 2-0-stable~1975
# 4f2d927
git rebase 4f2d927
# Resolve conflicts...

# Branch doesn't boot, identify fix a few commits ahead
git rebase 46a8d4e

# Still not booting, let's jump to the next 100
gl -1 2-0-stable~1875
git rebase acf3945

Progress

  • helpers :white_check_mark:
  • jobs :white_check_mark:
  • lib :white_check_mark:
  • performance :white_check_mark:
  • mailers :white_check_mark:
  • models :white_check_mark:
  • serializers :white_check_mark:
  • javascripts :white_check_mark:
  • views :white_check_mark:
  • requests :white_check_mark:
  • controllers (customer) :white_check_mark:
  • controllers (admin) :white_check_mark:
  • features (customer) :white_check_mark:
  • features (admin) :fire:
    • bulk_product_update_spec.rb
    • products_spec.rb
1 Like

@RohanM I’ve been looking at S3 config and noticed in their docs:

Currently the Spree backend does not give you the option anymore to configure s3 for image storage. This guide covers how you can use S3 for storing assets in Spree.

See this commit.

That suggests that S3 settings will need to be handled in an initializer and supported in ofn-install. Is that something I could help with?

cc @maikel

@RohanM spree-upgrade-3 is

  • all green at the last modification commited on the branch
  • but sometimes red (here after a merge commit that adds no modification to the above build)
    :thinking:

Step 4

gco -b spree-upgrade-step-4

# 100 commits forward
git rebase 448c108

:white_check_mark: This step is all green in travis

Step 5

spree-upgrade-step-5 is rebased on top of 030ea71

Diff between step 4 and step 5 in the spree fork

:fire: 6 feature specs failing


We wonder what is the best way to handle database migrations (both schema and data) that are added at each step in spree. @enricostn observed that spree comes with new migrations to import in OFN. They are not applied yet between :

  • step1c -> step3
  • step3 -> step4
  • step4 -> step5

as it is recommended during the upgrade:

rake railties:install:migrations
rake db:migrate

@RohanM: Do you have any advice to share about this ?

That’s interesting, I thought I’d been running that command and thought that we were up to date with migrations from spree (though maybe I forgot to check last step?). I would think that we would need to bring those migrations across from spree, otherwise spree’s code would be expecting a different model.

I manually checked all the schema migrations introduced by spree gem from spree-upgrade-step1c to spree-upgrade-step-3 (diff) and they are all in place and reflected in db/schema.rb.

There was only one data migration, but the change was minimal.

Migration manual check for spree gem upgrade from spree-upgrade-step-3 to spree-upgrade-step-4 (diff):

  • schema migrations: already in place and in db/schema.rb
  • data migrations: there is one from spree_paypal_express gem, added to the code and run. Will need to run in other environments too.

Migration manual check for spree gem upgrade from spree-upgrade-step-4 to spree-upgrade-step-5 (diff):

  • schema migrations: one already in place and in db/schema.rb, had to add another one
  • data migrations: no

Step 6

spree-upgrade-step-6 is rebased on top of 030ea71…31e8ca8

Check the changes in OFN pull request

Diff between step 5 and step 6 in the spree fork

Migrations

  • schema migrations: already in place and in db/schema.rb
  • data migrations: no

Temporary commits

Step 7

spree-upgrade-step-7 is rebased on top of 31e8ca8…216fc39

Check the changes in OFN pull request

Diff between step 5 and step 6 in the spree fork

Migrations

  • schema migrations: 15 migrations to import
  • data migrations: 2

Temporary commits

Should we move this to Spree upgrade category?

thanks to whoever did it!

1 Like