Skip to content
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

Remove incorrect consumer timeout #4384

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/infrahub/services/adapters/message_bus/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def _initialize_api_server(self) -> None:
queue = await self.channel.declare_queue(
f"{self.settings.namespace}.rpcs",
durable=True,
arguments={"x-max-priority": 5, "x-consumer-timeout": self.DELIVER_TIMEOUT * 1000},
arguments={"x-max-priority": 5},
)

self.delayed_exchange = await self.channel.declare_exchange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ async def test_rabbitmq_initial_setup(rabbitmq_api: RabbitMQManager) -> None:
assert (
Queue(
name="infrahub.rpcs",
arguments={"x-max-priority": 5, "x-consumer-timeout": 30000},
arguments={"x-max-priority": 5},
durable=True,
exclusive=False,
queue_type="classic",
Expand Down
11 changes: 11 additions & 0 deletions changelog/4308.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Fixed incorrect consumer timeout for RabbitMQ queue infrahub.rpcs

If you are upgrading from a previous version of Infrahub and using the provided Docker Compose files you don't have to take any additional action. However if you are using your own setup for RabbitMQ you will need to manually delete the queue yourself.

Swap the container name and credentials to RabbitMQ if they are different in your setup:

```bash
docker exec -it infrahub-message-queue-1 rabbitmqadmin --username infrahub --password infrahub delete queue name=infrahub.rpcs
```

After this step Infrahub and the Git agents need to be restarted, when doing so the correct queue will be recreated.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ x-infrahub-config: &infrahub_config

services:
message-queue:
image: ${MESSAGE_QUEUE_DOCKER_IMAGE:-rabbitmq:3.13.1-management}
image: ${MESSAGE_QUEUE_DOCKER_IMAGE:-rabbitmq:3.13.7-management}
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: *broker_username
Expand Down
2 changes: 1 addition & 1 deletion tasks/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DatabaseType(str, Enum):
)
NEO4J_DOCKER_IMAGE = os.getenv("NEO4J_DOCKER_IMAGE", "neo4j:5.19.0-enterprise")
MESSAGE_QUEUE_DOCKER_IMAGE = os.getenv(
"MESSAGE_QUEUE_DOCKER_IMAGE", "rabbitmq:3.13.1-management" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine"
"MESSAGE_QUEUE_DOCKER_IMAGE", "rabbitmq:3.13.7-management" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine"
)
CACHE_DOCKER_IMAGE = os.getenv("CACHE_DOCKER_IMAGE", "redis:7.2.4" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine")

Expand Down
Loading