-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix: Get product image uploads working again #6309
Conversation
- Fixes #6298 mostly by updating to dependencies with the fixes - @reactioncommerce/[email protected] - @reactioncommerce/[email protected] - @reactioncommerce/[email protected] - Also switch to the node v14.15.0 docker-base images - Unclear if this is strickly required but yet again the sharp package native add-on compiling was failing with C dependency errors Signed-off-by: Peter Lyons <[email protected]>
Ah, I now see that DCO wants mailchimp email addresses. OK fixed that. |
@mikemurray Do you know if this is CircleCI being slow?
|
I am now able to upload an initial image with this PR, however, I am still running into an error when trying to duplicate a product that has an image on it. It seems related, but this is a good first step: #6310 |
Yup, seems like it. Ran test locally and they all completed successfully. Also tested uploading images and works! Great job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- fixes #6310 Signed-off-by: Peter Lyons <[email protected]>
I added another commit that hopefully will fix #6310 too. Tomorrow will look into CI timing out with mongo errors. |
@focusaurus I have verified that duplicating variants with images works as expected. |
Signed-off-by: Peter Lyons <[email protected]>
CI is fixed with a new release of api-core. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looks good, #6310 is fixed as well, nice work!
the sharp package native add-on compiling was failing with
C dependency errors
Resolves #6298
Impact: minor
Type: bugfix
Issue
Uploading product images from within reaction-admin was failing consistently with a chain of errors originating deep within our file upload stack (file-collections, the upload server, and supporting code). See #6298 for more details but ultimately there was a nodejs stream object representing the write to gridfs, and code was calling
stream.destroy()
. The normal behavior for that is to emit an"error"
event with no arguments. I believe that bit of code is functioning as designed. In the reaction code, we bound event listeners to this event but failed to handle the case when this event had to passed arguments.Solution
The fixes amounted to detecting these spurious error events and ignoring them, allowing things to proceed successfully.
Breaking changes
None expected.
Testing
I've tested top-level product images and variants and they work.