Closed ihor-sviziev closed 2 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.
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
.
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.
@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.
@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?
No support for dependent patches.
True, I'd welcome a PR for it! :)
@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#L472Apparently they should be
magento/magento2-base
,magento/inventory-composer-metapackage
andmagento/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.
In case if you have any questions - let me know
@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.
@ihor-sviziev I added MCLOUD
to the list, could you try again?
@peterjaap will check that
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.
@ihor-sviziev could you try again? I've done some refactoring today.
@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.
@ihor-sviziev actually in that case it still makes sense to use this extension :)
As I reported earlier on Twitter - we tried to use it on Magento 2.3.6 - unfortunately, it’s having a lot of issues.
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
butos/MDVA-28682__fixes_issue_with_missing_random_products_from_categories_after_reindex__2.3.0.patch
is generatedIt 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.
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#L594Also 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.