-
Notifications
You must be signed in to change notification settings - Fork 9.4k
#18624 Refactoring: Extract addLinks to own class #21658
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
#18624 Refactoring: Extract addLinks to own class #21658
Conversation
Hi @amenk. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Still WIP, but want to kick of the CI for some full tests |
Todo [ ] Inject LinkProcessor via DI (I think we need a factory)
|
|
Hi @amenk. Regarding the integration tests, take a look at: I believe, there's no |
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
@dmanners Thanks for your review. |
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.
Thanks for the pull request @amenk ! Please see my code review comments
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
Outdated
Show resolved
Hide resolved
Now a conflict appeared :-( Have to review this. is this otherwise ready to merge? |
Conflicts solved -- was only static tests suppression |
@sivaschenko Which of the failing builds do I have to tackle?
|
…or-importexport-links
(wrong property name)
And what about the static tests? When I run LiveCodeTest locally I do not get those errors: (see https://testing-service.magento-community.engineering/reports/magento/magento2/pull/21658/7df8ac0b-32e5-4377-aebc-7dbf531faa3c/6412/Statics/allure-report-ce/index.html#suites/51d3ab4d5d77a0bc6a7ea344e9e7e6be/5823c27e50eef3c2/) Is this test not idempotent? |
@odubovyk also worked on the refactoring of this part - which is great... I think I have to start over with extracting the code to a seperate class. It is very demotivating, that my pull request did not receive attention for almost weeks |
@odubovyk Would you be willing to extract the link processing code, to a separate classes as well as allowing injecting additional link types? |
Sorry to hear this but most of us do this here only in their free time as hobby and there are many open PRs and issues - there is just much to do. |
yes, agreed, me, too :-) Already trying to get motivated again ... I hope I can work with @odubovyk together to extract his code to a separate class to get the link-types injected. His work anyways seems to have some additional improvements to this part of the code (for example reducing cyclomatic-complexity), but it's all kept in the original Product-"God"-Class |
Hi @amenk , thanks for your patience! Sorry, I might have skipped reviewing this PR as I was probably confused by "WIP" in the first line of description. A great refactoring has been done here! As for tests:
I am also concerned by introducing new public methods to |
Thank you. Actually there are major merge conflicts now and the process of refactoring might have to be done again. The good thing is that things like cyclomatic complexity were already fixed there. Have to check again. |
I am trying to re-do the PR currently. |
follow up PR: |
Hi @amenk, thank you for your contribution! |
Accepted Community Pull Requests: - #27237: #26749: Saving CMS Page Title from REST web API makes content empty (by @engcom-Charlie) - #27215: Cleanup ObjectManager usage - Magento_Translation (by @Bartlomiejsz) - #27191: 26827 Added improvements to product attribute repository (save method) (by @sergiy-v) - #27125: #27124: Update wishlist image logic to match logic on wishlist page (by @mtbottens) - #23191: Refactor addlinks to own class take 3 (follows #21658) (by @amenk) - #25734: Experius 2.3 patch catalog flat (by @lewisvoncken) - #27273: MFTF: Test isolation, consistent naming (backwards-compatible) (by @lbajsarowicz) - #26015: Remove media gallery assets metadata when a directory removed (by @rogyar) Fixed GitHub Issues: - #26827: 500 when creating new product after adding attribute via API and assigning to attribute set via UI (reported by @vincentteyssier) has been fixed in #27191 by @sergiy-v in 2.4-develop branch Related commits: 1. acfc589 2. fcf734f - #27124: Share Wishlist Email: Image Logic Issue (reported by @mtbottens) has been fixed in #27125 by @mtbottens in 2.4-develop branch Related commits: 1. 854761d 2. 12ae6e5 3. 76e61ae 4. 428605d 5. b2d0793
WIP
follow up of #21230
Aim is to refactor product links during import, with the final aim of an extension point to import own relation types