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

✨ Re-add NATS Plugin after reset to upstream/main #813

Merged
merged 6 commits into from
Oct 22, 2024
Merged

✨ Re-add NATS Plugin after reset to upstream/main #813

merged 6 commits into from
Oct 22, 2024

Conversation

ff137
Copy link
Collaborator

@ff137 ff137 commented Oct 22, 2024

Signed-off-by: ff137 ff137@proton.me

ff137 and others added 6 commits October 22, 2024 18:43
* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* 🚀 take on NATS plugin

Copied from redis_events plugin, and replaced redis with nats-py (and json with orjson)

Signed-off-by: ff137 <ff137@proton.me>

* ✅ basic unit tests for events

Signed-off-by: ff137 <ff137@proton.me>

* 👷 skip nats_events integration testing

Signed-off-by: ff137 <ff137@proton.me>

* ✨ read `NATS_CREDS_FILE` from env vars

Signed-off-by: ff137 <ff137@proton.me>

* Update nats_events/README.md

Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>

* 🎨 rename nats topic to subject

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 replace f-string interpolation in logs

Signed-off-by: ff137 <ff137@proton.me>

* ✨ use JetStream. Define streams on startup

Signed-off-by: ff137 <ff137@proton.me>

* ✨ bind and re-use JetStream context

Signed-off-by: ff137 <ff137@proton.me>

* ✨ handle jetstream publish ack

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 remove use of `cast`

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 more clear setup of jetstream context, instead of just nats

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 update NATS subject map to use `.`-pattern

Signed-off-by: ff137 <ff137@proton.me>

* Update nats_events/README.md

Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>

* 🙈 don't ignore vscode settings

Signed-off-by: ff137 <ff137@proton.me>

* 🔧 vscode cspell settings

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 add some verbose logging for testing

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 update method for nats connection args

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 debug timeout error for defining stream, change stream name

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 debug on_startup connecting to jetstream

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 test replacing . in name with _

Signed-off-by: ff137 <ff137@proton.me>

* ✨ publish with retry -- correctly handle PubAck

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 log payload and no longer only write `with-state` records

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 fix payload log type

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 log levels

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* ✨ handle OutboundMessage type (make it serialisable)

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 retry should log error instead of raising exception

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 handle optional target types

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 add words to cspell list

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 remove define stream

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 define one stream with many subjects

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>
Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: ff137 <ff137@proton.me>
* 🎨 Update log levels

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade uvicorn

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade fastapi-slim

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade pytest-asyncio

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 trace -> debug

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>
* ⚡ skip outbound message types, temporarily for performance reasons

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: ff137 <ff137@proton.me>
@ff137 ff137 self-assigned this Oct 22, 2024
@ff137 ff137 added the enhancement New feature or request label Oct 22, 2024
@ff137 ff137 merged commit 1accd58 into main Oct 22, 2024
2 checks passed
@ff137 ff137 deleted the readd-nats branch October 22, 2024 16:07
ff137 added a commit that referenced this pull request Nov 12, 2024
* 🎉 NATS Plugin 🚧 (#666)

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* 🚀 take on NATS plugin

Copied from redis_events plugin, and replaced redis with nats-py (and json with orjson)

Signed-off-by: ff137 <ff137@proton.me>

* ✅ basic unit tests for events

Signed-off-by: ff137 <ff137@proton.me>

* 👷 skip nats_events integration testing

Signed-off-by: ff137 <ff137@proton.me>

* ✨ read `NATS_CREDS_FILE` from env vars

Signed-off-by: ff137 <ff137@proton.me>

* Update nats_events/README.md

Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>

* 🎨 rename nats topic to subject

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 replace f-string interpolation in logs

Signed-off-by: ff137 <ff137@proton.me>

* ✨ use JetStream. Define streams on startup

Signed-off-by: ff137 <ff137@proton.me>

* ✨ bind and re-use JetStream context

Signed-off-by: ff137 <ff137@proton.me>

* ✨ handle jetstream publish ack

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 remove use of `cast`

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 more clear setup of jetstream context, instead of just nats

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 update NATS subject map to use `.`-pattern

Signed-off-by: ff137 <ff137@proton.me>

* Update nats_events/README.md

Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>

* 🙈 don't ignore vscode settings

Signed-off-by: ff137 <ff137@proton.me>

* 🔧 vscode cspell settings

Signed-off-by: ff137 <ff137@proton.me>

* 🎨

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 add some verbose logging for testing

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 update method for nats connection args

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 debug timeout error for defining stream, change stream name

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 debug on_startup connecting to jetstream

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 test replacing . in name with _

Signed-off-by: ff137 <ff137@proton.me>

* ✨ publish with retry -- correctly handle PubAck

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 log payload and no longer only write `with-state` records

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 fix payload log type

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 log levels

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* ✨ handle OutboundMessage type (make it serialisable)

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 retry should log error instead of raising exception

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 handle optional target types

Signed-off-by: ff137 <ff137@proton.me>

* ✅ fix tests

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 add words to cspell list

Signed-off-by: ff137 <ff137@proton.me>

* 🚧 remove define stream

Signed-off-by: ff137 <ff137@proton.me>

* 🎨 define one stream with many subjects

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>
Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Signed-off-by: ff137 <ff137@proton.me>

* 🎨 nats_events: update log levels (#733)

* 🎨 Update log levels

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade uvicorn

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade fastapi-slim

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Upgrade pytest-asyncio

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

* 🐛 trace -> debug

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>

* Skip-nats-outbound-messages (#734)

* ⚡ skip outbound message types, temporarily for performance reasons

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock files

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update dependencies

Signed-off-by: ff137 <ff137@proton.me>

* ⬆️ Update lock file

Signed-off-by: ff137 <ff137@proton.me>

* ⏪ Revert changes to other lock files

Signed-off-by: ff137 <ff137@proton.me>

---------

Signed-off-by: ff137 <ff137@proton.me>
Signed-off-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>
Co-authored-by: Henry Msiska <henrymsi+dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant