From 0f63c227f5425995ae8c61f1d40ec85e7728528a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 12 Oct 2022 11:21:00 +0200 Subject: [PATCH] Deprecate the amqp1 driver and Remove qpid functional tests A recent oslo.messaging patch [1], not yet merged, who aim to update the test runtime for antelope lead us to the following error: ``` qdrouterd: Python: ModuleNotFoundError: No module named 'qpid_dispatch' ``` Neither debian nor ubuntu in the latest releases have any binary built for the qpid backend, not even 3rd party. Only qpid proton, the client lib, is available. To solve this issue, these changes propose to deprecate the AMQP1 driver who is the one based on qpid and proton, and propose to remove the related functional tests. The AMQP1 driver doesn't seems to be widely used. [1] https://review.opendev.org/c/openstack/oslo.messaging/+/856643 Closes-Bug: 1992587 Change-Id: Id2ca9cd9ee8b8dbdd14dcd00ebd8188d20ea18dc --- oslo_messaging/_drivers/impl_amqp1.py | 7 +++++++ .../deprecated-amqp1-driver-4bf57449bc2b7aad.yaml | 7 +++++++ tools/setup-scenario-env.sh | 13 ------------- 3 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 releasenotes/notes/deprecated-amqp1-driver-4bf57449bc2b7aad.yaml diff --git a/oslo_messaging/_drivers/impl_amqp1.py b/oslo_messaging/_drivers/impl_amqp1.py index d464742cd..2a90b1542 100644 --- a/oslo_messaging/_drivers/impl_amqp1.py +++ b/oslo_messaging/_drivers/impl_amqp1.py @@ -25,7 +25,9 @@ import logging import os import threading import uuid +import warnings +from debtcollector import removals from oslo_config import cfg from oslo_messaging.target import Target from oslo_serialization import jsonutils @@ -38,6 +40,7 @@ from oslo_messaging._drivers import base from oslo_messaging._drivers import common +warnings.simplefilter('always') proton = importutils.try_import('proton') controller = importutils.try_import( 'oslo_messaging._drivers.amqp1_driver.controller' @@ -103,6 +106,7 @@ def unmarshal_request(message): return (msg, data.get("context"), data.get("call_monitor_timeout")) +@removals.removed_class("ProtonIncomingMessage") class ProtonIncomingMessage(base.RpcIncomingMessage): def __init__(self, listener, message, disposition): request, ctxt, client_timeout = unmarshal_request(message) @@ -165,6 +169,7 @@ class ProtonIncomingMessage(base.RpcIncomingMessage): self.listener.driver._ctrl.add_task(task) +@removals.removed_class("Queue") class Queue(object): def __init__(self): self._queue = collections.deque() @@ -194,6 +199,7 @@ class Queue(object): self._pop_wake_condition.notify_all() +@removals.removed_class("ProtonListener") class ProtonListener(base.PollStyleListener): def __init__(self, driver): super(ProtonListener, self).__init__(driver.prefetch_size) @@ -214,6 +220,7 @@ class ProtonListener(base.PollStyleListener): qentry['disposition']) +@removals.removed_class("ProtonDriver") class ProtonDriver(base.BaseDriver): """AMQP 1.0 Driver diff --git a/releasenotes/notes/deprecated-amqp1-driver-4bf57449bc2b7aad.yaml b/releasenotes/notes/deprecated-amqp1-driver-4bf57449bc2b7aad.yaml new file mode 100644 index 000000000..a4e37fe56 --- /dev/null +++ b/releasenotes/notes/deprecated-amqp1-driver-4bf57449bc2b7aad.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The AMQP1 driver is now deprecated. Its related functional tests are also + disabled. Neither debian nor ubuntu in the latest releases have any binary + built for qpid server, not even 3rd party. Only qpid proton, the client + lib, is available. diff --git a/tools/setup-scenario-env.sh b/tools/setup-scenario-env.sh index 026cb1abf..8149f60f9 100755 --- a/tools/setup-scenario-env.sh +++ b/tools/setup-scenario-env.sh @@ -50,19 +50,6 @@ case $SCENARIO in export NOTIFY_TRANSPORT_URL=kafka://127.0.0.1:9092/ RUN="--env-prefix RABBITMQ run rabbitmq -- pifpaf --env-prefix KAFKA run kafka" ;; - scenario03) - _setup_global_site_package_path - export RPC_TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5692/ - export NOTIFY_TRANSPORT_URL=rabbit://pifpaf:secret@127.0.0.1:5682/ - RUN="--env-prefix RABBITMQ run rabbitmq -- pifpaf --debug --env-prefix QDR run qdrouterd --username stackqpid --password secretqpid --port 5692" - ;; - scenario04) - _setup_global_site_package_path - _setup_kafka - export RPC_TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5692/ - export NOTIFY_TRANSPORT_URL=kafka://127.0.0.1:9092/ - RUN="--env-prefix KAFKA run kafka -- pifpaf --debug --env-prefix QDR run qdrouterd --username stackqpid --password secretqpid --port 5692" - ;; *) ;; esac