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

Image code tweaks #6509

Merged
merged 3 commits into from
Dec 10, 2020
Merged

Image code tweaks #6509

merged 3 commits into from
Dec 10, 2020

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Dec 10, 2020

What? Why?

Follow up from #6014. The main scripts in that PR are not needed any more but I extracted a few tweaks that should improve code style and catch some edge cases.

All commits in this PR have been reviewed before. So I'll skip review and put this straight into test-ready.

What should we test?

Upload a product image and verify that it displays in the shop.

Release notes

Changelog Category: Technical changes

Image maintenance scripts are more robust now.

The changed code obtains the image dimensions when you first upload an
image. Unfortunately it's also triggered when thumbnails are refreshed.
That doesn't change the size of the original image though.
If you ran only the second spec without the first, the rake file wasn't
loaded and the test failed.
@filipefurtad0
Copy link
Contributor

Hey @mkllnk ,
the build is failing on this spec:
rspec ./spec/controllers/checkout_controller_concurrency_spec.rb:47 # CheckoutController handles two concurrent orders successfully

I'll rebuild and check if it's gone after that 👍

@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Dec 10, 2020
@filipefurtad0 filipefurtad0 self-assigned this Dec 10, 2020
@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Dec 10, 2020

Ok, rebuilt this PR: the previously failing spec passed, and another one failed -> i.e., flaky specs...

Checked:

  • image upload of different sizes and formats (jpg and png) in /products and
  • if the changes were being observed in the shopfront

This looks got to go. Thanks @mkllnk 👍

@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Dec 10, 2020
@sauloperez sauloperez merged commit b4b4d38 into openfoodfoundation:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants