-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Use current sore id for category runtime cache #36394
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
Use current sore id for category runtime cache #36394
Conversation
Hi @ilnytskyi. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
@magento run Unit Tests, Integration Tests, Functional Tests B2B |
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.
Hello @ilnytskyi,
It seems the failed integration test is due to the changes. Please fix them.
Thanks
@magento run all tests |
@magento run all tests |
@magento run all tests |
@magento run Static Tests, Integration Tests, Functional Tests B2B |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests EE, Integration Tests |
Hello @ilnytskyi, Thanks for your contributions! I tried to replicate the issue by following the steps outlined in the issue, but it did not work. While I have reviewed the changes and they look good to me, could you please provide some manual testing steps to help reproduce the issue? Thanks again! |
@engcom-Dash They are covered in new tests from my extended PR: https://github.com/magento/magento2/pull/34226/files#diff-0c57d86ecc634a08c2d329ff07f105f94a34b55d7945804b31740fc21cd4c781 And described in description: #34226 basically previously when custom code did something with category in multistore loop and did not provided store key to category repo. It was cached under I think that Magento/CatalogUrlRewrite/Observer/CategoryUrlPathAutogeneratorObserverTest.php test might be failing due to not cleared runtime cache for category repository. As I see it was added before my changes, and might be affected by the original issue. Maybe
Should be used to isolate tests or removing shared instances in tearDown. I am not sure if AppIsolation works correctly. |
Hello @ilnytskyi, Thank you for your contributions! ✔️ QA Passed I appreciate your efforts in addressing the issue. While it was challenging to replicate the original problem, I created a script for debugging. I found that when fetching the same category without specifying a store, the functionality was fetching data from the array key 'all', leading to potential conflicts. After your changes, I can confirm that the system now creates distinct store IDs as keys in the array. This ensures that the correct category data is retrieved for each store, even when a store ID is not specified. Builds are failed, hence moving it to Extended Testing. |
@magento run Integration Tests |
@magento run all tests |
@magento run Unit Tests, Functional Tests B2B |
@magento create issue |
f50b9da
into
magento:2.4-develop
Description (*)
This is shorter PR version of https://github.com/magento/magento2/pull/34226/files that only fixes main issue and does not include suggested performance improvements.
When emulation is used or custom code saves the category in different stores, the object stored in runtime might be from wrong store to that causes data override.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: