-
Notifications
You must be signed in to change notification settings - Fork 34
Use patch command at first #82
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
Conversation
@oshmyheliuk could you review this PR? |
Hi @iGerchak Could you please help us to reproduce this issue? Here is my concern about the proposed solution There is no guarantee that there won't be other issues with PATCH and we won't be switching back and forth. Moreover, I don't know any reliable resources that suggest PATCH over GIT for applying patches. Maybe we should think of making it configurable (e.g using environment variable). Perhaps, we should handle this specific issue in GitDriver and consider it as a failure so it will fallback to PATCH? |
Hi,
We were having issue with magento installation that is installed through
composer and added to git repository. Please check that
…On Wed, 23 Dec 2020 at 19:38 Buba Suma ***@***.***> wrote:
Hi @iGerchak <https://github.com/iGerchak>
I couldn't reproduce this issue in 2.3.6. I applied the patch using
command ./vendor/bin/magento-patches apply MDVA-31168-V2. The patch was
successfully applied and I could see the changes applied in
/vendor/magento/module-downloadable-import-export/Model/Export/RowCustomizer.php:85.
Could you please help us to reproduce this issue?
Here is my concern about the proposed solution
There is no guarantee that there won't be other issues with PATCH and we
won't be switching back and forth. Moreover, I don't know any reliable
resources that suggest PATCH over GIT for applying patches. Maybe we should
think of making it configurable (e.g using environment variable). Perhaps,
we should handle this specific issue in GitDriver and consider it as a
failure so it will fallback to PATCH?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#82 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOJOUIRDSYGSMLXLZBK3NTSWITK5ANCNFSM4VEKSJNQ>
.
|
@bubasuma any updates? We're having this issue both on Ubuntu based local machine and on CI/CD. We're running apply command on top of checked out git repository. If you're not able to reproduce it - please contact me in slack - it will be much more effective |
Hi @ihor-sviziev Before ApplyAfter ApplyAfter Revert |
@bubasuma will try to provide you more details next week |
@ihor-sviziev Could you please also check if there are other patches with the same issue in your environment? |
@ihor-sviziev please try to modify the patch header.
with
and apply using Git |
@viktym will try that one as well |
Static Analysis & Code Style Results❌ One or more static analysis or code style checks have failed. PHP Codesniffer Output
PHP Mess Detector Output
PHPStan Output
This comment was generated by Jenkins job magento-cloud-docker/static build 3. |
Unit & Integration Test Results❌ One or more unit or integration tests have failed. Unit Test Output
Integration Test Output
This comment was generated by Jenkins job magento-cloud-docker/unit build 2. |
Unit Test Results✅ All unit tests have passed. Unit Test Output
This comment was generated by Jenkins job magento-cloud-patches/unit build 5. |
Static Analysis & Code Style Results✅ All static analysis and code style checks have passed. PHP Codesniffer Output
PHP Mess Detector Output
This comment was generated by Jenkins job magento-cloud-patches/static build 6. |
Functional Acceptance Test Results❌ One or more functional acceptance tests have failed. PHP 7.1
PHP 7.2
PHP 7.3
PHP 7.4
Output for failed tests is below. If many tests have failed only the first 5 will be included. If you need additional information please reach out to the Magento Cloud team for more details. This comment was generated by Jenkins job magento-cloud-patches/functional build 10. |
PHP 7.1 Acceptance71Cest Output
This comment was generated by Jenkins job magento-cloud-patches/functional build 10. |
PHP 7.1 Acceptance71CeCest Output
This comment was generated by Jenkins job magento-cloud-patches/functional build 10. |
PHP 7.1 Acceptance71CePart2Cest Output
This comment was generated by Jenkins job magento-cloud-patches/functional build 10. |
PHP 7.1 Acceptance71Part2Cest Output
This comment was generated by Jenkins job magento-cloud-patches/functional build 10. |
Hi @viktym and @bubasuma, I executed following commands: head -n1 vendor/magento/quality-patches/patches/os/MDVA-30942__fixes_performance_when_exporting_100k_products_using_consumers__2.3.5-p2.patch
php vendor/bin/magento-patches apply MDVA-31168-V2
php vendor/bin/magento-patches status | grep MDVA-31168-V2 Before changing: After: It seems like a correct fix for this issue will be going through all the patches in https://github.com/magento/quality-patches/tree/master/patches and replace |
Also, let's introduce a feature that will prevent such an issue in the future, maybe adjusting the following check to check if it's not in the working tree using magento-cloud-patches/src/Shell/Command/GitDriver.php Lines 87 to 97 in 0415656
Similar to this https://github.com/vaimo/composer-patches/blob/2295a6696534ef9e0eaa7c7f50e1b9ddb0aacae9/src/Config/Defaults.php#L40 |
@viktym @ihor-sviziev @bubasuma @iGerchak |
It wasn’t fixed. Please review my recent comments
…On Wed, 20 Jan 2021 at 19:48 Oleksandr Shmyheliuk ***@***.***> wrote:
@viktym <https://github.com/viktym> @ihor-sviziev
<https://github.com/ihor-sviziev> @bubasuma <https://github.com/bubasuma>
@iGerchak <https://github.com/iGerchak>
As I understand the problem was solved and we can close this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#82 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOJOUPP3CIJHPPCAS5KY63S24JP5ANCNFSM4VEKSJNQ>
.
|
@oshmyheliuk I think the issue still exists although we're not able to reproduce it. But as suggested @ihor-sviziev, the correct fix would be to replace |
@ihor-sviziev thanks for raising it up, investigation, and valuable advices |
@ihor-sviziev is it enough to replace |
@viktym, it was enough to replace just a first line. I'm curious that potentially this issue might appear again if we do not introduce some prevention mechanism, like checking inside the working tree. What do you think about it? You can see in my previous comments more details about that |
@ihor-sviziev thanks for this tip |
@viktym cool. Thank you! |
@ihor-sviziev patches from https://github.com/magento/quality-patches/tree/master/patches are already updated and released in 'magento/quality-patches':1.0.14 (please update magento/quality-patches package on your instances) |
MCLOUD-10863: Release MCP 1.0.23
Description
On Magento 2.3.6 Open Source we had an issue when the patch MDVA-31168-V2 was silently failing with no changes in code. During debug session together with @ihor-sviziev we found that it executes the following command:
After adding

-v
argument - we found the following error, with 0 return code:Skipped patch 'vendor/magento/module-downloadable-import-export/Model/Export/RowCustomizer.php'.
During some googling, I found that sometimes it's happening and it's recommended to use patch command instead:
https://stackoverflow.com/questions/42386491/git-apply-skips-patches
So my suggestion is to use
patch
command at first with a fallback to the git apply.Note:
git --version
output:git version 2.20.1
Also reproducting on git version 2.27.0
Fixed Issues (if relevant)
Manual testing scenarios
Release notes
For user-facing changes, add a meaningful release note. For examples, see Magento Cloud Patches release notes.
Associated documentation updates
Add link to Magento DevDocs PR or Issue, if needed.
Contribution checklist