Openfoodnetwork: Release v3.3.0

Created on 22 Oct 2020  路  10Comments  路  Source: openfoodfoundation/openfoodnetwork

Steps:

The full process is described at https://github.com/openfoodfoundation/openfoodnetwork/wiki/Releasing.

Most helpful comment

I just double-checked this on staging-ES as well:

Before resizing/deploy:

image

After resizing/deploy:

image

I think we are good here!

All 10 comments

Update guide for image resizing

Anyone managing an OFN instance should perform these steps to adjust image sizes before deploying this release. It should take 5-10 minutes.

If you've deployed the release already (without following these steps) and then realised the image sizes need to be updated, skip straight to part 2 :smile:

Part 1 - in the app

Log in as an admin user and go to https://<your-domain>/admin/image_settings/edit.

Under "Paperclip Settings" there should be four input fields, and the first two fields for MINI and SMALL images should have: 48x48> and 100x100>. Change these values to: 48x48# and 227x227#. Then scroll down to the bottom and hit the Update button.
Screenshot from 2020-10-22 22-17-11

Part 2 - in the console

In a terminal, connect to the server via SSH and do the following steps:

ssh openfoodnetwork@<your-domain>
cd apps/openfoodnetwork/current
bundle exec rails console

Wait until the console says: irb(main):001:0>, and then paste this in (and hit enter):

Spree::Image.find_each { |image| image.attachment.reprocess!(:mini, :small) rescue nil }

You should see some console output while it's running. When it stops, type quit to leave the console.

Done :+1:

Checking it's worked

You can verify the resizing was successful by going to a shop, right-clicking a product image in the shopfront and clicking "View Image" and it should say the size is 227px by 227px:

Screenshot from 2020-10-26 17-02-31

Hey @Matt-Yorkley

I've tested the release in staging-UK, after the fix about your deploy. All good there for a newly created enterprise and added pics.

https://docs.google.com/document/d/18kZlifPhBhFRQArif_z7QCt1CHZ4RFi3WEbQZ0_X3PM/edit#

However, I'm not entirely sure the transition works smoothly between the previous and the new shopfront.

  • in stagin-UK, for a pre-existing hub, the pics look like smaller than they should I think

image

Also, the pics seem to be missing in pre-existing shops, after following the procedure for resizing windows and your fix #6248:

image

There was a failed staging attempt in this server, so maybe that's the reason. I'll retry the resizing procedure for staging-ES + deploy and report here again in a few mins.

@Matt-Yorkley Did the image resizing tasks happen on staging servers?

Looking now :+1:

I just followed my steps from the guide on UK Staging, and it looks good. Images in this shop were not resized before, and are resized now: https://staging.openfoodnetwork.org.uk/spicy-stuff-hub/shop

There's a few shops that have broken images on UK Staging, but they were broken before :+1:

Going to the Rails console:

Screenshot from 2020-10-26 11-45-15

Pasting in the resizing command:

Screenshot from 2020-10-26 11-45-27

After resizing has finished:

Screenshot from 2020-10-26 11-45-54

I just double-checked this on staging-ES as well:

Before resizing/deploy:

image

After resizing/deploy:

image

I think we are good here!

There is a tiny issue shopfront issue, which affects only:

  • mobile
  • items with prices in EUR
  • prices with 4 digits

See below, left side - staging-UK / right side staging-ES

image

I wouldn't say this is a blocker and will proceeded to open issue #6252 on this but pinging you @Matt-Yorkley @RachL @lin-d-hop for awareness.

Dear Matt, I'm trying to reproduce your steps on my staging environment and at part 2 I have this error:

Screenshot 2020-10-31 at 13 19 22

Seems there is a missing command.
Thanks in advance!
David

Problem solved with the installation of file command on Ubuntu 18.04:

sudo apt-get install -y file

Was this page helpful?
0 / 5 - 0 ratings