Code review comment for autopkgtest-cloud:queues-not-created

Revision history for this message
Brian Murray (brian-murray) wrote :

> This LGTM and I see the same logic is used elsewhere.
> I wonder if
>
> # 404s invalidate the channel for some reason
> self.amqp_channel = self.amqp_con.channel()
>
> is really needed here, but I'm +1 with keeping it.

I tried not including it and come to find out it is really needed!

2022-06-28 00:40:40: Queue debci-impish-s390x has 0 items
2022-06-28 00:40:40: Trying to lock semaphore queue semaphore-ubuntu-impish-armhf...
2022-06-28 00:40:40: ...locked.
Traceback (most recent call last):
  File "webcontrol/cache-amqp", line 246, in <module>
    queue_contents = aq.get_queue_contents()
  File "webcontrol/cache-amqp", line 160, in get_queue_contents
    requests = self.get_queue_requests(queue_name)
  File "webcontrol/cache-amqp", line 98, in get_queue_requests
    r = self.amqp_channel.basic_get(queue_name)
  File "/usr/lib/python3/dist-packages/amqplib/client_0_8/channel.py", line 2116, in basic_get
    self._send_method((60, 70), args)
  File "/usr/lib/python3/dist-packages/amqplib/client_0_8/abstract_channel.py", line 75, in _send_method
    self.connection.method_writer.write_method(self.channel_id,
AttributeError: 'NoneType' object has no attribute 'method_writer'

« Back to merge proposal