Skip to content
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

Communication's component validator does not propagate exceptions, obscuring the cause of the error #14555

Closed
nikita2206 opened this issue Apr 5, 2018 · 8 comments
Assignees
Labels
Component: Framework/Communication Event: squashtoberfest Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@nikita2206
Copy link

nikita2206 commented Apr 5, 2018

It was quite hard to understand the issue with my request schema until I went into Magento\Framework\Communication\Config\Validator and changed exception instantiation from new LogicException($message) to new LogicException($message, 0, $e). My issue was to do with this in the end: Each getter must have a doc block. It would be better if it was possible to see that error message out of the box, but instead I was only seeing Request schema definition for topic "..." should reference existing service class. Given ... (while the class obviously existed).

Preconditions

Magento 2.2.5

Steps to reproduce

  1. A schema class:
class Dummy {
    private $foo;

    public function getFoo() { return $this->foo; }
    public function setFoo($foo) { $this->foo = $foo; }
}
  1. Communication configuration (communication.xml):
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Communication/etc/communication.xsd">
    <topic name="foo_topic" request="Dummy" />
</config>
  1. Run validation for communication configuration. It can be done either automatically if you're using Magento EE, or can be done manually by calling into Magento\Framework\Communication\Config->getTopic("foo_topic")

Expected result

e

Actual result

r

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Apr 5, 2018
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Aug 3, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release good first issue Component: Framework/Communication labels Aug 3, 2018
@ArtsiomBruneuski
Copy link
Contributor

#sqashtoberfest

@ArtsiomBruneuski
Copy link
Contributor

#squashtoberfest

@magento-engcom-team
Copy link
Contributor

@ArtsiomBruneuski thank you for joining. Please accept team invitation here and self-assign the issue.

@ArtsiomBruneuski
Copy link
Contributor

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @ArtsiomBruneuski. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ArtsiomBruneuski, here is your Magento instance.
Admin access: https://i-14555-2-3-develop.engcom.dev.magento.com/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@sidolov sidolov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 12, 2018
@sidolov sidolov added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 13, 2018
@sidolov sidolov closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Framework/Communication Event: squashtoberfest Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line good first issue Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

5 participants