Skip to content

Refactor addlinks to own class take 3 (follows #21658) #23191

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

amenk
Copy link
Contributor

@amenk amenk commented Jun 10, 2019

Description

This is a follow up of #21658 - please refer to that one for more information.

It contains two steps

  • Refactoring: Extract LinkProcessing functionality
  • Change: Allow setting link types via DI (the original reason for this PR)

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jun 10, 2019

Hi @amenk. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@amenk
Copy link
Contributor Author

amenk commented Jun 10, 2019

@sivaschenko can you review this?

Again, I don't understand the failed tests, as the reports do not show valuable info or are not available.

Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updates @amenk , please see my review comments

Static tests build does not have a report indeed - relaunched it.

@ghost ghost assigned sivaschenko Jun 10, 2019
@orlangur orlangur self-assigned this Jun 10, 2019
@amenk
Copy link
Contributor Author

amenk commented Jun 12, 2019

All checks are green..

@sivaschenko
Copy link
Member

Great, thanks @amenk . Although, it is not a serious B/C problem, additional optional constructor parameters can have a negative B/C effect in some situations. So we are required to get it approved with a responsible architect. @akaplya can you please take a look at this?

@amenk
Copy link
Contributor Author

amenk commented Jun 13, 2019 via email

@amenk
Copy link
Contributor Author

amenk commented Jun 22, 2019

@akaplya @sivaschenko I also want to understand which kind of negative effects that can be.

@orlangur orlangur removed their assignment Jun 22, 2019
@sivaschenko
Copy link
Member

@amenk the example of negative effect:

  1. Optional constructor parameter added in 2.3.3
  2. Extension created based on 2.3.3 that is relying on the optional parameter added and i.e. change the parameter with DI arguments node
  3. That extension is installed on Magento 2.3.1 - as there is not optional parameter - we've got a problem

@amenk
Copy link
Contributor Author

amenk commented Jun 26, 2019 via email

@amenk
Copy link
Contributor Author

amenk commented Jul 30, 2019

bump @sivaschenko @akaplya

Can this pleeeeeease be considered for merging?

@amenk
Copy link
Contributor Author

amenk commented Sep 5, 2019

bump @sivaschenko @akaplya

this has tag needs-update but I don't know which update you are expecting from me?

Can this be progressed ?

@amenk
Copy link
Contributor Author

amenk commented Sep 5, 2019

@sivaschenko By the way: The idea to extract it to a new class originally came from @orlangur in #21230 (comment)

So I think it's the best way to proceed here. Or is there any other solution for the problem?

@sidolov
Copy link
Contributor

sidolov commented Sep 23, 2019

@amenk you are right, idea with extraction is the best way here. Could you please cover changes with automated tests?

@amenk
Copy link
Contributor Author

amenk commented Sep 24, 2019

@sidolov Thanks for your response. Actually I did mostly make no changes to functionality, just the extraction behind the scenes.
The only functional change is, that the list of link types can be injected via DI. Not sure if that needs to be covered with tests, as DI is a core function.

@amenk
Copy link
Contributor Author

amenk commented Feb 27, 2020

I have a problem with CyclomaticComplexity of 11 of

I found a way by externalizing filtering ...

@amenk
Copy link
Contributor Author

amenk commented Feb 27, 2020

@amenk
Copy link
Contributor Author

amenk commented Feb 28, 2020

@sidolov @sivaschenko All tests are green. can this be merged now?

@ihor-sviziev ihor-sviziev added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Mar 4, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7035 has been created to process this Pull Request
✳️ @ihor-sviziev, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@amenk
Copy link
Contributor Author

amenk commented Mar 5, 2020

@ihor-sviziev Thanks a lot for reviewing & accepting. What are the next steps towards a merge?

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Mar 5, 2020

@amenk it will go through testing and merging flow.
You can track the status on the following board https://github.com/orgs/magento/projects/5#card-22569262

Hope it will be really fast

@amenk
Copy link
Contributor Author

amenk commented Mar 5, 2020

@ihor-sviziev Okay, I think changes-requested by sivaschenko should be cleared, because I added the tests? All changes seem to be resolved. Shall I click "Dismiss review" ?

@ihor-sviziev
Copy link
Contributor

@amenk no need, your PR already waiting to be tested

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented Mar 19, 2020

Hi @amenk, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants