-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
catalog:images:resize total images count calculates incorrectly #18387: #18807
catalog:images:resize total images count calculates incorrectly #18387: #18807
Conversation
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix getCountAllProductImages select and cover class with unit tests.
Hi @vpodorozh. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style;
@vpodorozh thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix unit test - now it can test also not only full batches, but partial as well (139 images with batch size 100);
…-resize' into 2.3-develop-18387-catalog-images-resize
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix unit test - now it can test also not only full batches, but partial as well (139 images with batch size 100);
…rectly magento#18387: magento#18807 (cherry picked from commit e1a1c7b)
Hi @duhon - I've found out that my unit test Thx. |
catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue - fix code style;
…-resize' into 2.3-develop-18387-catalog-images-resize # Conflicts: # app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Product/ImageTest.php
…rrectly magento#18387: magento#18807 (cherry picked from commit f38a4fc)
Okay, guys, I'm tired to fix these "quality review" issues by codacy. Do I really need to fix these problems? : https://app.codacy.com/app/antonkril/magento2/pullRequest?prid=2433664 |
@vpodorozh you may ignore the Codacy failures. You don't need to fix them |
Hi @vpodorozh. Thank you for your contribution. |
Description (#18387)
Assumption from issue: >>"catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue".
However, there is a problem with total images count calculation select (distinct by image path is not used in
count(*)
) - functionality by itself works correctly and process all images.Fixed Issues
#18387: catalog:images:resize fails to process all images -> Possible underlying Magento/Framework/DB/Query/Generator issue
getCountAllProductImages
method that calculates total images count incorrectly;\Magento\Catalog\Model\ResourceModel\Product\Image
with unit tests;Manual testing scenarios
Variant I
Expected result
You do see total images count 801.
Actual result
You do see total images count 3422.
Variant II (synthetic case)
php bin/magento setup:performance:generate-fixtures setup/performance-toolkit/profiles/ce/medium.xml
For details check
catalog_product_entity_media_gallery
table.example SQL to do this:
create temporary table zzz as (select NULL as value_id, c.attribute_id, c.value, c.media_type, c.disabled from catalog_product_entity_media_gallery as c); insert into catalog_product_entity_media_gallery select * from zzz;
Expected result
Total images count will be equal to the value from
setup/performance-toolkit/profiles/ce/medium.xml
inimages-count
node ( 1000 ).Actual result
Total images count will be 2 times higher that their exact value.
Contribution checklist (*)