elgentos / magento2-composer-quality-patches

elgentos/magento2-composer-quality-patches
22 stars 2 forks source link

List of faced issues #2

Closed ihor-sviziev closed 2 years ago

ihor-sviziev commented 3 years ago

As I reported earlier on Twitter - we tried to use it on Magento 2.3.6 - unfortunately, it’s having a lot of issues.

  1. Seems like it’s not validating the current version and selecting just the first available patch file Example: try to apply patch MDVA-30977-V2. According to the https://github.com/magento/quality-patches/blob/1.0.13/patches.json#L471-L490 for magento 2.3.6 following patch should be used: os/MDVA-30977__fixes_issue_with_missing_random_products_from_categories_after_reindex__2.3.5-p1_v4.patch but os/MDVA-28682__fixes_issue_with_missing_random_products_from_categories_after_reindex__2.3.0.patch is generated

  2. It skips the first patch in the status grid So far just compare the status command output with the generated json, 1st patch isn't available.

  3. No support for dependent patches. Seems like the require section is just ignored. Sample: https://github.com/magento/quality-patches/blob/1.0.13/patches.json#L594

Also looked on implementation - it’s just parsing command output. is there any reason for not using Magento classes that providing patches info? I believe such an approach should be way more accurate.

peterjaap commented 3 years ago

I'll get back to this after my holidays, but in response to your last question; I tried that, but the magento/quality-patches repo isn't a regular Magento extension, but a totally separate package so it was practically impossible to get the data out of there in useful way. I don't remember exactly what it was - I also thought in first instance that'd be easy but that didn't turn out to be the case.

peterjaap commented 3 years ago

So first finding;

vendor/bin/magento-patches status | grep -b3 MDVA-30977-V2
╟───────────────┼──────────────────────────────────────────────────────────────┼────────────┼─────────────┼──────────────────────────────────────────────╢
49851:║ MDVA-30977-V2 │ Fixes the issue with random products missing from categories │ Optional   │ Not applied │ Affected components:                         ║
50093-║               │  after reindex.                                              │            │             │  - magento/module-catalog                    ║
50341-║               │                                                              │            │             │  - magento/module-catalog-search             ║
50573-║               │                                                              │            │             │  - magento/module-indexer                    ║

This output comes from Magento's own magento-patches command. The modules listed under "affected components" don't match with the modules listed here; https://github.com/magento/quality-patches/blob/1.0.13/patches.json#L472

Apparently they should be magento/magento2-base, magento/inventory-composer-metapackage and magento/inventory-metapackage.

peterjaap commented 3 years ago

So I'm mixing two things up. The affected components are modules to which the actual patch get applied. The module mentioned in the patches.json file I referenced is used to define constraints on a higher level.

peterjaap commented 3 years ago

@ihor-sviziev I updated it here; https://github.com/elgentos/magento2-composer-quality-patches/pull/3

I ran into the same issues, but on a Magento 2.4.1 install. Using this branch I get a composer.quality-patches.json file with the following patches;

MDVA-32545
MDVA-32739
MDVA-33482
MDVA-33970
MDVA-28191
MDVA-30265
MDVA-30972
MDVA-30106
MDVA-32632
MDVA-31399
MDVA-30858
MDVA-33559
MDVA-31006
MDVA-13203
MDVA-12304
MDVA-30102
MDVA-33382
MDVA-30963
MDVA-31969
MDVA-31021
MDVA-31759
MDVA-31236
MDVA-33975
MDVA-30977-V2
MDVA-31007-V3
MDVA-33393
MDVA-34469
MDVA-28651-V2
MDVA-30284
MDVA-29446
MDVA-28202
MDVA-30945
MC-38509
MDVA-30164
MDVA-30594
MDVA-29148

Which seems correct to me.

peterjaap commented 3 years ago

@ihor-sviziev

It skips the first patch in the status grid So far just compare the status command output with the generated json, 1st patch isn't available.

I don't understand this one?

peterjaap commented 3 years ago

No support for dependent patches.

True, I'd welcome a PR for it! :)

ihor-sviziev commented 3 years ago

@peterjaap

So first finding;

vendor/bin/magento-patches status | grep -b3 MDVA-30977-V2
╟───────────────┼──────────────────────────────────────────────────────────────┼────────────┼─────────────┼──────────────────────────────────────────────╢
49851:║ MDVA-30977-V2 │ Fixes the issue with random products missing from categories │ Optional   │ Not applied │ Affected components:                         ║
50093-║               │  after reindex.                                              │            │             │  - magento/module-catalog                    ║
50341-║               │                                                              │            │             │  - magento/module-catalog-search             ║
50573-║               │                                                              │            │             │  - magento/module-indexer                    ║

This output comes from Magento's own magento-patches command. The modules listed under "affected components" don't match with the modules listed here; https://github.com/magento/quality-patches/blob/1.0.13/patches.json#L472

Apparently they should be magento/magento2-base, magento/inventory-composer-metapackage and magento/inventory-metapackage.

It seems like in this file we see the list of base packages in order to check their versions and based on it apply different patch. The logic of extracting list of affected modules located here: https://github.com/magento/quality-patches/blob/721a5a28549cd32315f05dd031ebb16be8d6c03c/src/Test/Integrity/Testsuite/ModularityTest.php#L135-L174

@ihor-sviziev

It skips the first patch in the status grid So far just compare the status command output with the generated json, 1st patch isn't available.

I don't understand this one?

Magento Open Source 2.3.6 "magento/quality-patches": "1.0.13",

./vendor/bin/magento-patches status | head
Patch details you can find on https://support.magento.com (search for patch id, ex. MDVA-30265)
Release notes https://devdocs.magento.com/quality-patches/release-notes.html
╔═══════════════╤══════════════════════════════════════════════════════════════╤══════════╤═════════════╤══════════════════════════════════════════════════════════╗
║ Id            │ Title                                                        │ Type     │ Status      │ Details                                                  ║
╠═══════════════╪══════════════════════════════════════════════════════════════╪══════════╪═════════════╪══════════════════════════════════════════════════════════╣
║ MCLOUD-5684   │ Pagination Not working - product_list_limit=all              │ Optional │ Not applied │ Affected components:                                     ║
║               │                                                              │          │             │  - magento/module-elasticsearch                          ║
╟───────────────┼──────────────────────────────────────────────────────────────┼──────────┼─────────────┼──────────────────────────────────────────────────────────╢
║ MC-38509      │ Fixes the issue where the `Create an Account` button stays d │ Optional │ Not applied │ Affected components:                                     ║
║               │ isabled after correcting invalid data in the `Create New Cus │          │             │  - magento/module-customer                               ║

In the status grid, the first listed patch is MCLOUD-5684. In the generated composer.quality-patches.json we don't have this patch.

Generated composer.quality-patches.json file ```json { "patches": { "magento/module-customer": { "Quality Patch MC-38509 Fixes the issue where the `Create an Account` button stays disabled after correcting invalid data in the `Create New Customer Account` form.": { "source": "./vendor/magento/quality-patches/patches/os/MC-38509__fixes_create_account_submit_button_state_after_form_validation__2.4.1.patch", "level": 4 }, "Quality Patch MDVA-30164 Fixes the issue where customers records cannot be exported from the Customers grid, if custom customer attributes exist.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30164__fixes_customer_export_when_custom_customer_attribute_exists__2.3.2.patch", "level": 4 } }, "magento/module-configurable-product": { "Quality Patch MDVA-30945 Fixes the issue where you receive a fatal error message when updating carts \"Call to a member function getValue() on null in module-configurable-product CartItemProcessor.php\".": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30945__fixes_fatal_error_in_module-configurable-product_cartitemprocessor__2.3.3.patch", "level": 4 } }, "magento/module-catalog": { "Quality Patch MDVA-30963 Fixes the issue where products filtering results set to only contain values specified for 'All store views' scope in Admin, include products with values overridden on the store view level.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30963__fixes_admin_product_search_filter__2.4.0.patch", "level": 4 }, "Quality Patch MDVA-29965 Fixes the issue where customers get Invalid Form Key error when adding a product to the cart.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-29965_fixes_invalid_form_key_error_when_adding_to_cart_before_page_fully_refreshes_2.3.5-p1.patch", "level": 4 } }, "magento/module-quote-graph-ql": { "Quality Patch MDVA-31363 Fixes the issue where the Cart Price Rule with coupon does not apply via GraphQL when 'Fixed amount discount for whole cart' action is used.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-31363__fixes_cart_price_rule_coupon_does_not_apply_via_graphQl__2.4.0.patch", "level": 4 }, "Quality Patch MDVA-30444 Fixes the issue where no confirmation email is sent for orders placed using GraphQL.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30444__fixes_confirmation_email_not_sent_with_orders_placed_using_graphql__2.3.5-p1.patch", "level": 4 } }, "magento/module-inventory-source-selection": { "Quality Patch MDVA-30889 Fixes the issue where an error occurs after invoicing a bundle with virtual and simple products as options.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30889__fixes_invoicing_a_bundle_with_virtual_and_simple_option__2.3.4.patch", "level": 4 } }, "magento/module-downloadable-import-export": { "Quality Patch MDVA-31168-V2 Fixes the issue where the product export CSV file does not appear, and there is a memory allocation error.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30942__fixes_performance_when_exporting_100k_products_using_consumers__2.3.5-p2.patch", "level": 4 } }, "magento/module-catalog-import-export": { "Quality Patch MDVA-31759 Fixes the issue where products are not updated with `dropdown` and `textarea` attribute values during CSV import.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-31759__attribute_values_were_not_updated_during_import__2.3.5-p2.patch", "level": 4 }, "Quality Patch MDVA-31021 Fixes the issue where performance issues exists in module-catalog-import-export/Model/Import/Product/Option.php. If there are more than ~100k records in catalog_product_option table, a new CSV with single product takes less than 10 sec to validate.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-31021__fixes_performance_issue_during_product_import_when_having_a_large_amount_of_options_in_catalog_product_option_table__2.3.1.patch", "level": 4 } }, "magento/module-directory": { "Quality Patch MDVA-32012 Fixes the issue where zip codes in Korea and Argentina cannot be validated.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-32012__updates_Korean_and_Argentina_zip_code_validation__2.3.5-p1.patch", "level": 4 } }, "magento/module-sales-rule": { "Quality Patch MDVA-31399 Adds the \"Subtotal (Incl. Tax)\" option to price rule conditions.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-31399__adds_new_option_subtotal_including_tax_to_cart_price_rule_condition__2.3.5-p2_v1.patch", "level": 4 }, "Quality Patch MDVA-32632 Fixes the issue where orders appear in the payment system, but not in Magento.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-32632__fixes_issue_when_orders_appeared_in_the_payment_system_but_not_in_Magento__2.3.2-p2.patch", "level": 4 } }, "*": { "Quality Patch MDVA-30845 Fixes the issue where the \"Sorry, no quotes are available for this order at this time\" error is displayed when failing to connect to UPS XML/USPS/DHL, and no other shipping method is available.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30845__fixes_error_when_failing_to_connect_to_ups_xml_usps_dhl_and_other_shipping_method_is_not_available__2.3.5-p2.patch", "level": 2, "targets": [ "magento/module-dhl", "magento/module-ups", "magento/module-usps" ] }, "Quality Patch MDVA-27825 Fixes the issue where exporting of big amounts of data failed because of memory leak.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-27825__fix_memory_leak_prevent_customer_export__2.3.3.patch", "level": 2, "targets": [ "magento/framework", "magento/module-eav" ] }, "Quality Patch MDVA-30599 Fixes the issue where guest quotes created using API are incorrectly marked as quotes for logged in customers.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30599__fixes_issue_with_API_created_guest_quotes_marked_as_logged_in_customers_quotes__2.3.5-p2.patch", "level": 2, "targets": [ "magento/module-checkout", "magento/module-persistent", "magento/module-quote" ] }, "Quality Patch MDVA-30977-V2 Fixes the issue with random products missing from categories after reindex.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-28682__fixes_issue_with_missing_random_products_from_categories_after_reindex__2.3.0.patch", "level": 2, "targets": [ "magento/module-catalog", "magento/module-catalog-search", "magento/module-indexer", "magento/module-inventory-configurable-product-indexer", "magento/module-inventory-indexer" ] }, "Quality Patch MDVA-28202 Fixes the issue where Layered Navigation doesn't filter configurable products correctly when MSI is used.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-28202__fixes_issue_with_layered_navigation_not_filtering_configurable_products_correctly_with_msi__2.3.5-p1.patch", "level": 2, "targets": [ "magento/module-configurable-product", "magento/module-inventory-configurable-product" ] } }, "magento/framework": { "Quality Patch MDVA-12304 Increases the maximum number of cookies from 50 to 200.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-12304__increases_maximum_number_of_cookies_from_50_to_200__2.2.5.patch", "level": 4 }, "Quality Patch MDVA-13203 Fixes the issue where the 'Integrity constrain violation search_tmp_* table' error appears after a full reindex.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-13203__Fixes_ann_error_integrity_constrain_violation_search_tmp___2.2.4.patch", "level": 4 }, "Quality Patch MDVA-30102 Fixes the issue where Redis cache grows up quickly since layout caches don't have TTL.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30102__fixes_issue_when_redis_cache_grows_up_quickly__2.3.5.patch", "level": 4 } }, "magento/module-sales": { "Quality Patch MDVA-32739 Fixes the issue where enabling Asynchronous Email Notifications sends out old sales emails.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-32739__fixes_issue_where_enabling_asynchronous_email_notifications_sends_out_old_sales_emails__2.3.5-p2.patch", "level": 4 }, "Quality Patch MDVA-32545 Fixes the issue where invoices are not sent out automatically when creating orders from Admin.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-32545__fixes_the_issue_where_invoices_are_not_sent_out_automatically__2.3.2-p2.patch", "level": 4 }, "Quality Patch MDVA-30265 Fixes the issue where shipment tracking link stops working after Invoice creation.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30265__fixes_tracking_link_redirects_to_404__2.3.3.patch", "level": 4 }, "Quality Patch MDVA-30232 Fixes the issue where it is not possible to re-order if the original order contains a gift card.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30232__fixes_issue_with_re-order_when_order_contains_giftcard__2.3.5-p1.patch", "level": 4 }, "Quality Patch MDVA-28191 Fixes the issue where no payment methods are loaded during order creation via Magento Admin panel.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-28191__fixes_no_payments_during_order_creation_in_admin_panel__2.3.5-p1.patch", "level": 4 }, "Quality Patch MDVA-30972 Fixes the issue where custom order status was changed to Processing after partial shipment creation using WebApi.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30972__fixes_issue_where_custom_order_status_is_changed_to_processing_after_partial_shipment_creation_via_webapi__2.3.5-p2.patch", "level": 4 } }, "magento/module-paypal": { "Quality Patch MDVA-30858 Fixes the issue with PayPal Settlement reports not being available under Reports > Sales > PayPal Settlement as expected.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30858__fixes_the_issue_with_PayPal_Settlement_reports_not_available__2.3.4.patch", "level": 4 }, "Quality Patch MDVA-31006 Fixes the issue where duplicated orders appear after placing an order using Paypal Express payment.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-31006__fixes_issue_with_duplicated_orders_when_using_paypal_express_payment__2.3.1.patch", "level": 4 } }, "magento/module-analytics": { "Quality Patch MDVA-29389 Fixes the issue with Advanced Reporting where the analytics_collect_data cronjob says: \"Port must be configured within host parameter (like localhost:3306)\".": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-29389__fixes_error_port_must_be_configured_within_host_parameter_for_advance_reporting__2.3.4_v1.composer.patch", "level": 4 } }, "magento/module-eav": { "Quality Patch MDVA-29148 Fixes the issue when creating a product via an API call, the product custom attribute of \"\\Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\ArrayBackend\" (like Multiselect) type does not use its default value if no value was provided in the payload.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-29148__fixes_issue_with_product_custom_attribute_arraybackend_not_using_default_value_if_value_is_not_provided_in_api_payload__2.3.3-p1.patch", "level": 4 } }, "magento/module-ui": { "Quality Patch MDVA-30106 Fixes the issue where during checkout, payments are not loaded with \u201cCannot read property \u2018length\u2019 of null \u201d error in JS console.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30106__fix_validation_for_possible_null_objects_on_validation_rules__2.3.4.patch", "level": 4 } }, "magento/module-elasticsearch": { "Quality Patch MDVA-30284 Fixes the issue where Catalog Search indexer fails due to the following Elasticsearch error: `limit of total fields in index has been exceeded`.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30284__fixes_catalog_search_indexer_fail_due_to_elasticsearch_error__2.3.5-p2.patch", "level": 4 } }, "magento/module-tax": { "Quality Patch MDVA-30594 Fixes the issue where an order with multiple addresses could not be saved during checkout when FPT is configured.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30594__fixes_issue_where_order_with_multiple_addresses_is_not_saved_during_checkout_when_fpt_is_configured__2.3.3.patch", "level": 4 } }, "magento/module-checkout": { "Quality Patch MDVA-29446 Fixes the issue where the price of not applicable shipping method is shown as zero during checkout.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-29446__fixes_issue_with_non_applicable_shipping_method_price_shown_as_zero_in_checkout__2.3.4.patch", "level": 4 } }, "magento/module-sitemap": { "Quality Patch MDVA-30357 Fixes the issue with wrong image URLs are created when generating a sitemap by cron.": { "source": "./vendor/magento/quality-patches/patches/os/MDVA-30357__fixes_issue_with_wrong_image_url_created_on_sitemap_generated_by_cron__2.3.3.patch", "level": 4 } } } } ```

In case if you have any questions - let me know

peterjaap commented 3 years ago

@ihor-sviziev right sorry we don't use Cloud, so I hadn't noticed those patches. It's missing in this regex, I'll fix it.

peterjaap commented 3 years ago

@ihor-sviziev I added MCLOUD to the list, could you try again?

ihor-sviziev commented 3 years ago

@peterjaap will check that

peterjaap commented 3 years ago

Running into an issue with unified patches, for example this one ./vendor/magento/quality-patches/patches/os/MDVA-27664__fixes_error_The_Date_of_Birth_should_not_be_greater_than_today__2.3.4-p2_v2.patch.

It fails at lib/web/mage/validation.js because it doesn't know where this file lives (it's in magento/magento2-base). I'll have to figure out how to fix this.

Den4ik commented 3 years ago

https://github.com/magento/quality-patches

peterjaap commented 3 years ago

https://github.com/magento/quality-patches

Yes?

peterjaap commented 2 years ago

@ihor-sviziev could you try again? I've done some refactoring today.

ihor-sviziev commented 2 years ago

@peterjaap, sorry, we're primarily not using all the quality patches anymore, just installing the only needed. That's why I don't expect to use this tool soon. Sorry, you can close this issue if you believe it's fixed now.

peterjaap commented 2 years ago

@ihor-sviziev actually in that case it still makes sense to use this extension :)