RohanM
June 10, 2016, 7:15am
1
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:
Thread for test results for spree upgrade steps.
Hi everyone,
If you’ve ever thought you might like to try testing, now is your chance We need lots of hands on deck to scour the entire site for anything fishy, so the more the merrier!
Rohan is working on implementing a Spree upgrade. His latest work is currently on the OFN staging server, ready for testing- Staging2.openfood.com.au . It will be on staging from 9th Nov - 17th Nov Australia time.
It’s intended that this Spree upgrade will have no effect on existing functionalit…
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
jobs
lib
performance
mailers
models
serializers
javascripts
controllers (customer)
controllers (admin)
views
requests
features (customer)
features (admin)
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
RohanM
November 9, 2016, 1:43am
2
1 Like
pmackay
January 24, 2017, 11:13am
3
@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
emak
April 6, 2017, 2:30pm
4
@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)
Step 4
gco -b spree-upgrade-step-4
# 100 commits forward
git rebase 448c108
This step is all green in travis
emak
April 12, 2017, 5:04pm
5
Step 5
spree-upgrade-step-5
is rebased on top of 030ea71
Diff between step 4 and step 5 in the spree fork
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 ?
RohanM
April 12, 2017, 11:17pm
6
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