summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml1
-rw-r--r--oslo_messaging/_drivers/impl_rabbit.py22
-rw-r--r--releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml5
-rw-r--r--tox.ini4
4 files changed, 20 insertions, 12 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index f7de7b2..db99dee 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -108,7 +108,6 @@
- check-requirements
- lib-forward-testing-python3
- openstack-cover-jobs
- - openstack-lower-constraints-jobs
- openstack-python3-wallaby-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py
index f436cbe..0d7673e 100644
--- a/oslo_messaging/_drivers/impl_rabbit.py
+++ b/oslo_messaging/_drivers/impl_rabbit.py
@@ -169,12 +169,16 @@ rabbit_opts = [
default=2,
help='How often times during the heartbeat_timeout_threshold '
'we check the heartbeat.'),
- cfg.IntOpt('direct_mandatory_flag',
- default=True,
- help='Enable/Disable the RabbitMQ mandatory flag '
- 'for direct send. The direct send is used as reply, '
- 'so the MessageUndeliverable exception is raised '
- 'in case the client queue does not exist.'),
+ cfg.BoolOpt('direct_mandatory_flag',
+ default=True,
+ deprecated_for_removal=True,
+ deprecated_reason='Mandatory flag no longer deactivable.',
+ help='(DEPRECATED) Enable/Disable the RabbitMQ mandatory '
+ 'flag for direct send. The direct send is used as reply, '
+ 'so the MessageUndeliverable exception is raised '
+ 'in case the client queue does not exist.'
+ 'This flag is deprecated and it will not be possible to '
+ 'deactivate this functionality anymore'),
cfg.BoolOpt('enable_cancel_on_failover',
default=False,
help="Enable x-cancel-on-ha-failover flag so that "
@@ -1261,11 +1265,11 @@ class Connection(object):
_set_current_channel is responsible to cleanup the cache.
"""
- queue_indentifier = (exchange.name, routing_key)
+ queue_identifier = (exchange.name, routing_key)
# NOTE(sileht): We only do it once per reconnection
# the Connection._set_current_channel() is responsible to clear
# this cache
- if queue_indentifier not in self._declared_queues:
+ if queue_identifier not in self._declared_queues:
queue = kombu.entity.Queue(
channel=self.channel,
exchange=exchange,
@@ -1279,7 +1283,7 @@ class Connection(object):
'Connection._publish_and_creates_default_queue: '
'declare queue %(key)s on %(exchange)s exchange', log_info)
queue.declare()
- self._declared_queues.add(queue_indentifier)
+ self._declared_queues.add(queue_identifier)
self._publish(exchange, msg, routing_key=routing_key, timeout=timeout)
diff --git a/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml b/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml
new file mode 100644
index 0000000..3c14aad
--- /dev/null
+++ b/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml
@@ -0,0 +1,5 @@
+---
+upgrade:
+ - |
+ Deprecating the ``direct_mandatory_flag``. It will not be possible to
+ deactivate this functionality anymore.
diff --git a/tox.ini b/tox.ini
index bed65f9..a9ebb78 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 3.1
-envlist = py38,pep8
+envlist = py3,pep8
ignore_basepython_conflict = true
[testenv]
@@ -12,7 +12,7 @@ passenv = OS_*
REQUIREMENTS_PIP_LOCATION
install_command = pip install {opts} {packages}
deps =
- -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}