-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
MysqlMq: Use new MessageQueue Config interface, update unit tests #21942
MysqlMq: Use new MessageQueue Config interface, update unit tests #21942
Conversation
Hi @Berdir. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Had a look at the failing test, but can't reproduce that locally and don't know how that could be related. I did have a look at the functional tests and realized for example \Magento\MysqlMq\Model\PublisherConsumerTest is completely skipped right now, which is failing hard if you remove that. I started updating that but I don't know enough about Magento and it would be a lot of work. I started updating the config a bit, but then got stuck. Pushed what I have to:https://github.com/Berdir/magento2/tree/functional-mysql-mq-test-updates I would suggest to consider merging this (assuming the functional test fail was either random or can be fixed) and look into updating the functional tests after that. Right now, the MysqlMq compontent is completely non-functional. |
This is the last Travis message
might be good to re-run the tests on the new testing infrastructure. |
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.
Didn't find better way to implement it with current methods available.
But we also can do a new resolver for minimise code duplication and move those 2 repeatable parts of code there.
$exchanges = $this->messageQueueConfig->getExchanges(); | ||
foreach ($exchanges as $exchange) { | ||
// @todo Is there a more reliable way to identify MySQL exchanges? | ||
if ($exchange->getConnection() == 'db') { |
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.
You can use this resolver:
Magento\MysqlMq\Model\ConnectionTypeResolver which will allow you to detect Mysql connection type: getConnectionType. Which is basically if NOT a null, then a Mysql connection
$exchanges = $this->messageQueueConfig->getExchanges(); | ||
foreach ($exchanges as $exchange) { | ||
// @todo Is there a more reliable way to identify MySQL exchanges? | ||
if ($exchange->getConnection() == 'db') { |
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.
You can use this resolver:
Magento\MysqlMq\Model\ConnectionTypeResolver which will allow you to detect Mysql connection type: getConnectionType. Which is basically if NOT a null, then a Mysql connection
@Berdir , I am closing this PR now due to inactivity. |
Hi @Berdir, thank you for your contribution! |
Description (*)
This fixes the deprecated usage of the old ConfigInterface in MysqlMQ
Fixed Issues (if relevant)
Manual testing scenarios (*)
See issue, using the MysqlMq adapter for a message queue is currently not working at all.
Contribution checklist (*)