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

0.8.0 #122

Merged
merged 44 commits into from
Feb 4, 2025
Merged

0.8.0 #122

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
816ae6d
Fixing Issues with Consumers termination
NeonKirill Mar 30, 2024
a84ab94
Increment Version to 0.7.2a1
NeonKirill Mar 30, 2024
99b2236
feat: allow ovos-utils 0.1.0 (#96)
mikejgray Apr 25, 2024
e6c61fa
Increment Version to 0.7.2a2
NeonDaniel Apr 25, 2024
4deb976
Update OVOS dependencies (#98)
NeonDaniel Sep 12, 2024
2c5cd08
Increment Version to 0.7.2a3
NeonDaniel Sep 12, 2024
2aafcf9
[FEAT] Async-based Consumers Support (#99)
NeonKirill Nov 21, 2024
e629a59
Increment Version to 0.7.2a4
NeonDaniel Nov 21, 2024
ef96424
[BUG FIX] Fixing Async Consumer Logic to work based on SelectConnecti…
NeonKirill Dec 3, 2024
a39737e
Increment Version to 0.7.2a5
NeonDaniel Dec 3, 2024
505ea14
Eliminated "self joining" problem in consumer threads and added grace…
NeonKirill Dec 5, 2024
77b6d76
Increment Version to 0.7.2a6
NeonKirill Dec 5, 2024
ab771ee
[Bug Fix] Fixing issue with reopenning connection on consumers (#103)
NeonKirill Dec 5, 2024
c634ead
Increment Version to 0.7.2a7
NeonKirill Dec 5, 2024
9915cc2
Update tests to use temporary RMQ instance and improve coverage (#104)
NeonDaniel Dec 11, 2024
f845c3f
Increment Version to 0.7.2a8
NeonDaniel Dec 11, 2024
13604c7
Improve connection close and error handling (#107)
NeonDaniel Jan 2, 2025
989429a
Increment Version to 0.7.2a9
NeonDaniel Jan 2, 2025
ced4ad7
Fix ` reconnection` with unit test coverage (#109)
NeonDaniel Jan 13, 2025
c5bd3b7
Increment Version to 0.7.2a10
NeonDaniel Jan 13, 2025
87c85ae
Define `shutdown` method for NeonMQHandler with unit test coverage (#…
NeonDaniel Jan 14, 2025
857a7d2
Increment Version to 0.7.2a11
NeonDaniel Jan 14, 2025
a777c9c
Resolve observed connection errors (#111)
NeonDaniel Jan 16, 2025
936c3d0
Increment Version to 0.7.2a12
NeonDaniel Jan 16, 2025
11d48e1
Update StreamLost handling from error to warning to prevent non-actio…
NeonDaniel Jan 17, 2025
ac28303
Increment Version to 0.7.2a13
NeonDaniel Jan 17, 2025
f083a7f
Raise exception if MQ startup check fails (#116)
NeonDaniel Jan 22, 2025
255d7f7
Increment Version to 0.7.2a14
NeonDaniel Jan 22, 2025
43667c8
Update default async consumer behavior and configuration (#113)
NeonDaniel Jan 23, 2025
a9fba67
Increment Version to 0.7.2a15
NeonDaniel Jan 23, 2025
cfc073f
Support Select Connections in `emit_mq_message` (#115)
NeonDaniel Jan 23, 2025
d0f56a5
Increment Version to 0.7.2a16
NeonDaniel Jan 23, 2025
9037174
Update copyright notices to 2025 (#118)
NeonDaniel Jan 23, 2025
2b52c34
Increment Version to 0.7.2a17
NeonDaniel Jan 23, 2025
0aa88f9
Improved Startup Connectivity Checks (#117)
NeonDaniel Jan 23, 2025
2f95c41
Increment Version to 0.7.2a18
NeonDaniel Jan 23, 2025
dd071d5
Add specific handling for RMQ checks without a configured vhost (#119)
NeonDaniel Jan 24, 2025
783abe9
Increment Version to 0.7.2a19
NeonDaniel Jan 24, 2025
3595966
Refactor `_started` to `_consumers_started` to avoid conflicts in cla…
NeonDaniel Jan 24, 2025
1922f5a
Increment Version to 0.7.2a20
NeonDaniel Jan 24, 2025
989e0fa
Update to ensure `message_id` is not None (#121)
NeonDaniel Jan 27, 2025
f1a019e
Increment Version to 0.7.2a21
NeonDaniel Jan 27, 2025
adf3b43
Increment Version to 0.8.0
NeonDaniel Jan 28, 2025
83bc863
Update Changelog
NeonDaniel Jan 28, 2025
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
69 changes: 37 additions & 32 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,58 @@ on:
workflow_dispatch:

jobs:
unit_tests:
backwards_compat_tests:
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
python-version: [ '3.8', '3.10']
max-parallel: 1
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . -r requirements/test_requirements.txt
- name: Get Credential
run: |
mkdir -p ~/.local/share/neon
echo $CONNECTOR_CONFIG > ~/.local/share/neon/credentials.json
shell: bash
env:
CONNECTOR_CONFIG: ${{secrets.CONNECTOR_CONFIG}}
- name: Run Utils Tests
- name: Run Backward Compatibility Tests
run: |
pytest tests/test_utils.py --doctest-modules --junitxml=tests/utils-test-results.xml
- name: Upload Utils test results
uses: actions/upload-artifact@v2
pytest tests/backward_compat_tests.py --doctest-modules --junitxml=tests/backward-compatibility-test-results.xml
- name: Upload Backward Compatibility test results
uses: actions/upload-artifact@v4
with:
name: utils-test-results
path: tests/utils-test-results.xml
- name: Run Connector Tests
run: |
pytest tests/test_connector.py --doctest-modules --junitxml=tests/connector-test-results.xml
# env:
# MQ_TESTING: 1
- name: Upload Connector test results
uses: actions/upload-artifact@v2
name: backward-compatibility-test-results-${{ matrix.python-version }}
path: tests/backward-compatibility-test-results.xml
unit_tests:
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
name: connector-test-results
path: tests/connector-test-results.xml
- name: Run Backward Compatibility Tests
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies
run: |
pytest tests/test_backward_compatibility.py --doctest-modules --junitxml=tests/backward-compatibility-test-results.xml
- name: Upload Backward Compatibility test results
uses: actions/upload-artifact@v2
sudo apt update
sudo apt install -y rabbitmq-server

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . -r requirements/test_requirements.txt

- name: Run Unit Tests
run: |
pytest tests --doctest-modules --junitxml=tests/test-results.xml
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: backward-compatibility-test-results
path: tests/backward-compatibility-test-results.xml
name: test-results-${{ matrix.python-version }}
path: tests/test-results.xml
162 changes: 143 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,176 @@
# Changelog

## [0.7.1](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1) (2023-12-11)
## [0.7.2a21](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a21) (2025-01-27)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1a5...0.7.1)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a20...0.7.2a21)

**Closed issues:**
**Merged pull requests:**

- Update to ensure `message_id` is not None [\#121](https://github.com/NeonGeckoCom/neon_mq_connector/pull/121) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a20](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a20) (2025-01-24)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a19...0.7.2a20)

**Merged pull requests:**

- Update param name to avoid conflict with `threading.Thread` [\#120](https://github.com/NeonGeckoCom/neon_mq_connector/pull/120) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a19](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a19) (2025-01-24)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a18...0.7.2a19)

**Merged pull requests:**

- Handle RMQ checks with default vhost [\#119](https://github.com/NeonGeckoCom/neon_mq_connector/pull/119) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a18](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a18) (2025-01-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a17...0.7.2a18)

**Merged pull requests:**

- remove hard-coded configuration of log level [\#87](https://github.com/NeonGeckoCom/neon_mq_connector/issues/87)
- Improved Startup Connectivity Checks [\#117](https://github.com/NeonGeckoCom/neon_mq_connector/pull/117) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.1a5](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1a5) (2023-12-09)
## [0.7.2a17](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a17) (2025-01-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1a4...0.7.1a5)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a16...0.7.2a17)

**Merged pull requests:**

- Reduce message emit log to `DEBUG` [\#93](https://github.com/NeonGeckoCom/neon_mq_connector/pull/93) ([NeonDaniel](https://github.com/NeonDaniel))
- Update copyright notices to 2025 [\#118](https://github.com/NeonGeckoCom/neon_mq_connector/pull/118) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.1a4](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1a4) (2023-08-11)
## [0.7.2a16](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a16) (2025-01-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1a3...0.7.1a4)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a15...0.7.2a16)

**Merged pull requests:**

- Update `message_id` handling for response routing [\#92](https://github.com/NeonGeckoCom/neon_mq_connector/pull/92) ([NeonDaniel](https://github.com/NeonDaniel))
- Support Select Connections in `emit_mq_message` [\#115](https://github.com/NeonGeckoCom/neon_mq_connector/pull/115) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.1a3](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1a3) (2023-07-28)
## [0.7.2a15](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a15) (2025-01-23)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1a2...0.7.1a3)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a14...0.7.2a15)

**Merged pull requests:**

- Update message\_id handling for iris compat [\#91](https://github.com/NeonGeckoCom/neon_mq_connector/pull/91) ([NeonDaniel](https://github.com/NeonDaniel))
- Update default async consumer behavior and configuration [\#113](https://github.com/NeonGeckoCom/neon_mq_connector/pull/113) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.1a2](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1a2) (2023-07-27)
## [0.7.2a14](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a14) (2025-01-22)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1a1...0.7.1a2)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a13...0.7.2a14)

**Merged pull requests:**

- Update logging and response routing [\#89](https://github.com/NeonGeckoCom/neon_mq_connector/pull/89) ([NeonDaniel](https://github.com/NeonDaniel))
- Handle errors if MQ is not connected at service launch [\#116](https://github.com/NeonGeckoCom/neon_mq_connector/pull/116) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.1a1](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.1a1) (2023-07-26)
## [0.7.2a13](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a13) (2025-01-17)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.0...0.7.1a1)
[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a12...0.7.2a13)

**Merged pull requests:**

- Bug Fix: Setting Generated Message ID as default value, skipping it while already set [\#90](https://github.com/NeonGeckoCom/neon_mq_connector/pull/90) ([NeonKirill](https://github.com/NeonKirill))
- Update logging in select consumer close [\#112](https://github.com/NeonGeckoCom/neon_mq_connector/pull/112) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a12](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a12) (2025-01-16)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a11...0.7.2a12)

**Merged pull requests:**

- Resolve observed connection errors [\#111](https://github.com/NeonGeckoCom/neon_mq_connector/pull/111) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a11](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a11) (2025-01-14)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a10...0.7.2a11)

**Merged pull requests:**

- Define `shutdown` method for NeonMQHandler with unit test coverage [\#110](https://github.com/NeonGeckoCom/neon_mq_connector/pull/110) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a10](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a10) (2025-01-13)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a9...0.7.2a10)

**Merged pull requests:**

- Fix ` reconnection` with unit test coverage [\#109](https://github.com/NeonGeckoCom/neon_mq_connector/pull/109) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a9](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a9) (2025-01-02)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a8...0.7.2a9)

**Merged pull requests:**

- Improve connection close and error handling [\#107](https://github.com/NeonGeckoCom/neon_mq_connector/pull/107) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a8](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a8) (2024-12-11)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a7...0.7.2a8)

**Merged pull requests:**

- Update tests to use temporary RMQ instance and improve coverage [\#104](https://github.com/NeonGeckoCom/neon_mq_connector/pull/104) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a7](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a7) (2024-12-05)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a6...0.7.2a7)

**Merged pull requests:**

- \[Bug Fix\] Fixing issue with reopenning connection on consumers [\#103](https://github.com/NeonGeckoCom/neon_mq_connector/pull/103) ([NeonKirill](https://github.com/NeonKirill))

## [0.7.2a6](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a6) (2024-12-05)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a5...0.7.2a6)

**Merged pull requests:**

- Eliminated "self joining" problem in consumer threads and added graceful restarts handling [\#102](https://github.com/NeonGeckoCom/neon_mq_connector/pull/102) ([NeonKirill](https://github.com/NeonKirill))

## [0.7.2a5](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a5) (2024-12-03)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a4...0.7.2a5)

**Merged pull requests:**

- \[BUG FIX\] Fixing Async Consumer Logic to work based on SelectConnection [\#100](https://github.com/NeonGeckoCom/neon_mq_connector/pull/100) ([NeonKirill](https://github.com/NeonKirill))

## [0.7.2a4](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a4) (2024-11-21)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a3...0.7.2a4)

**Implemented enhancements:**

- \[FEAT\] Update tests to run without org secrets [\#97](https://github.com/NeonGeckoCom/neon_mq_connector/issues/97)

**Merged pull requests:**

- \[FEAT\] Async-based Consumers Support [\#99](https://github.com/NeonGeckoCom/neon_mq_connector/pull/99) ([NeonKirill](https://github.com/NeonKirill))

## [0.7.2a3](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a3) (2024-09-12)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a2...0.7.2a3)

**Merged pull requests:**

- Update OVOS dependencies [\#98](https://github.com/NeonGeckoCom/neon_mq_connector/pull/98) ([NeonDaniel](https://github.com/NeonDaniel))

## [0.7.2a2](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a2) (2024-04-25)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.2a1...0.7.2a2)

**Merged pull requests:**

- feat: allow ovos-utils 0.1.0 [\#96](https://github.com/NeonGeckoCom/neon_mq_connector/pull/96) ([mikejgray](https://github.com/mikejgray))

## [0.7.2a1](https://github.com/NeonGeckoCom/neon_mq_connector/tree/0.7.2a1) (2024-03-30)

[Full Changelog](https://github.com/NeonGeckoCom/neon_mq_connector/compare/0.7.1...0.7.2a1)

**Fixed bugs:**

- Fixing Issues with Consumers termination [\#95](https://github.com/NeonGeckoCom/neon_mq_connector/pull/95) ([NeonKirill](https://github.com/NeonKirill))



Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2021 Neongecko.com Inc.
# Copyright 2008-2025 Neongecko.com Inc.
# BSD-3 License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,27 @@ A response may be sent via:
)
```
Where `<queue>` is the queue to which the response will be published, and `data` is a `bytes` response (generally a `base64`-encoded `dict`).

### Asynchronous Consumers
By default, async-based consumers handling based on `pika.SelectConnection` will
be used

#### Override use of async consumers

There are a few methods to disable use of async consumers/subscribers.

1. To disable async consumers for a particular class/object,
set the class-attribute `async_consumers_enabled` to `False`:

```python
from neon_mq_connector import MQConnector

class MQConnectorChild(MQConnector):
async_consumers_enabled = False
```
2. To disable the use of async consumers at runtime, set the `MQ_ASYNC_CONSUMERS`
envvar to `False`

```shell
export MQ_ASYNC_CONSUMERS=false
```
2 changes: 1 addition & 1 deletion neon_mq_connector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 Neongecko.com Inc.
# Copyright 2008-2025 Neongecko.com Inc.
# Contributors: Daniel McKnight, Guy Daniels, Elon Gasper, Richard Leeds,
# Regina Bloomstine, Casimiro Ferreira, Andrii Pernatii, Kirill Hrymailo
# BSD-3 License
Expand Down
2 changes: 1 addition & 1 deletion neon_mq_connector/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 Neongecko.com Inc.
# Copyright 2008-2025 Neongecko.com Inc.
# Contributors: Daniel McKnight, Guy Daniels, Elon Gasper, Richard Leeds,
# Regina Bloomstine, Casimiro Ferreira, Andrii Pernatii, Kirill Hrymailo
# BSD-3 License
Expand Down
Loading
Loading