server
server copied to clipboard
Support RabbitMQ 3.9
Supposedly it's backwards compatible, but when I run the integration tests on the test server using the RabbitMQ 3.9 container I get the following error:
Traceback (most recent call last):
File "/code/server/games/game.py", line 446, in on_game_end
await self.process_game_results()
File "/code/server/games/game.py", line 467, in process_game_results
await self.game_service.publish_game_results(game_results)
File "/code/server/game_service.py", line 228, in publish_game_results
result_dict,
File "/code/server/message_queue_service.py", line 154, in publish
TRACE, "Published message %s to %s/%s", payload, exchange_name, routing
File "/usr/local/lib/python3.7/site-packages/aio_pika/transaction.py", line 64, in __aexit__
await self.commit()
File "/usr/local/lib/python3.7/site-packages/aio_pika/transaction.py", line 50, in commit
self.channel.tx_commit(), timeout=timeout,
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 414, in wait_for
return await fut
File "/usr/local/lib/python3.7/site-packages/aiormq/channel.py", line 764, in tx_commit
return await self.rpc(spec.Tx.Commit(), timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/aiormq/base.py", line 168, in wrap
return await self.create_task(func(self, *args, **kwargs))
File "/usr/local/lib/python3.7/site-packages/aiormq/base.py", line 27, in __inner
raise self.exception from e
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 630, in _wrap_awaitable
return (yield from awaitable.__await__())
File "/usr/local/lib/python3.7/site-packages/aiormq/base.py", line 27, in __inner
raise self.exception from e
aiormq.exceptions.ChannelPreconditionFailed: PRECONDITION_FAILED - partial tx completion
When running RabbitMQ 3.8 no errors happen. There are also issues with running the unit tests when using 3.9. We'll have to figure out what the underlying issue is and what needs to change with our usage of aiopika to prevent these errors.
- Update unit tests to use 3.9
- Add RabbitMQ version to readme
This error does not seem to occur on prod where RabbitMQ 3.9 is deployed for 2 weeks. The league service is receiving events and I do not see this error in the last hours of the logs.