Commit 45bb3b5
authored
fix: Split apache-libcloud versions for Python compatibility (#619)
* fix: Split apache-libcloud versions for Python compatibility
- Server (Python 3.9): apache-libcloud==3.2.0 (stable Cloudflare DNS)
- Client (Python 3.12): apache-libcloud==3.8.0 (Python 3.12 support)
Client Dockerfile installs requirements-webapp.txt after requirements.txt,
so libcloud 3.8.0 overrides 3.2.0 for the client container only.
Fixes Cloudflare DNS issues:
- libcloud 3.6.0: RecordAlreadyExistsError constructor bug
- libcloud 3.8.0: KeyError 'zone_name' in Cloudflare driver
- libcloud 3.2.0: Proven stable with Cloudflare, incompatible with Py3.12
Tested:
- Server: Python 3.9 + libcloud 3.2.0 (all 8 DNS tests pass)
- Client: Python 3.12 + libcloud 3.8.0 (imports work correctly)
* fix: Remove [opwen_email_server] extra from client package install
The client Dockerfile was installing the package with [opwen_email_server] extra,
which pulled in server dependencies (requirements.txt with libcloud 3.2.0).
This conflicted with the client's libcloud 3.8.0.
Client only needs the base package dependencies (requirements-webapp.txt).
* fix: Shorten comments to meet flake8 120 char limit and fix hadolint comment placement
* fix: Make test queue durable for RabbitMQ 4.0+ compatibility
RabbitMQ 4.0+ deprecated transient non-exclusive queues. The integration
test was creating a queue without durable=True, causing CI failures with:
InternalError: Queue.declare: (541) INTERNAL_ERROR - Feature
`transient_nonexcl_queues` is deprecated.
* Revert RabbitMQ fix - was incomplete
* fix: Configure Celery for RabbitMQ 4.0+ compatibility
RabbitMQ 4.0+ deprecated transient non-exclusive queues. This fix:
1. Explicitly defines all task queues as durable using Kombu Queue objects
2. Disables remote control (worker_enable_remote_control=False) to prevent
creation of non-durable pidbox queues that trigger the deprecation error
3. Updates test queue to be durable
Without these changes, Celery workers fail to start with:
amqp.exceptions.InternalError: Queue.declare: (541) INTERNAL_ERROR
Feature `transient_nonexcl_queues` is deprecated.
Tested successfully with RabbitMQ 4.3.1 - all integration tests pass.
* fix: Separate integration test dependencies into requirements-integration.txt
- Created requirements-integration.txt with server dependencies needed by AzureIoc
- Updated Dockerfile to install integration deps in both builder and runtime stages
- Production client (client.env) uses default Ioc without server dependencies
- Integration tests (webapp.env) use AzureIoc with full server dependencies
- Integration tests now pass successfully with BUILD_TARGET=runtime
* fix: RabbitMQ 4.0+ compatibility with explicit durable queues
- Define all 7 task queues explicitly as durable Queue objects
- Disable worker remote control to prevent transient pidbox queues
- Set worker_prefetch_multiplier=1 to avoid deprecated global_qos
- Fixes 'Feature transient_nonexcl_queues is deprecated' errors
- Integration tests pass with RabbitMQ 4.3.11 parent f3ca8ff commit 45bb3b5
6 files changed
Lines changed: 63 additions & 6 deletions
File tree
- docker/client
- opwen_email_server/integration
- tests/opwen_email_server/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
| 65 | + | |
| 66 | + | |
60 | 67 | | |
61 | | - | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
124 | 149 | | |
125 | 150 | | |
126 | 151 | | |
| |||
131 | 156 | | |
132 | 157 | | |
133 | 158 | | |
134 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
135 | 169 | | |
136 | 170 | | |
137 | 171 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments