Skip to content

plugin: return delivery results and simplify state management - #259

Merged
oxzi merged 1 commit into
mainfrom
state-channels-v2
Oct 16, 2026
Merged

oxzi merged 1 commit into
mainfrom
state-channels-v2

Conversation

@yhabteab

@yhabteab yhabteab commented Oct 2, 2026

Copy link
Copy Markdown
Member

This PR changes the SendNotification plugin interface to optionally allow to return any delivery results the plugin wants to show in Icinga Notifications Web. At the same time, that very same response result allows to implicitly upsert any channel specific state in the database without making any extra RPC calls. From now on, Icinga Notifications will always send a corresponding unique state key for each notification request if it's related to an incident, which a plugin can use to associate any value known to that plugin with the received key. They're no longer allowed to generate one on their own, or to explicitly delete an existing state via a separate RPC call. Consequently, I've dropped the channel::UpsertState and channel::DeleteState RPC methods. All states are managed exclusively by Icinga Notifications.

@yhabteab yhabteab added this to the 0.10.0 milestone Oct 2, 2026
@yhabteab yhabteab self-assigned this Oct 2, 2026
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Oct 2, 2026
@yhabteab
yhabteab requested a review from oxzi October 2, 2026 13:56
@yhabteab yhabteab changed the title plugin: allow to return delivery results & enhance state managements plugin: return delivery results and simplify state management Oct 5, 2026
@yhabteab
yhabteab force-pushed the state-channels-v2 branch 4 times, most recently from e2dfcbe to 31382eb Compare October 12, 2026 13:40
@yhabteab
yhabteab force-pushed the state-channels-v2 branch 4 times, most recently from 4620da9 to 0e208cc Compare October 16, 2026 06:23
Comment thread notifications/plugin/plugin.go
Comment thread notifications/plugin/plugin.go Outdated
Comment thread notifications/plugin/plugin.go Outdated
@yhabteab

Copy link
Copy Markdown
Member Author

Thanks. Fixed all the requested changes.

@yhabteab
yhabteab requested a review from oxzi October 16, 2026 07:24
@yhabteab

Copy link
Copy Markdown
Member Author

I just have a quick chat with Johannes about this, and suggested that this should be a bit more flexible to make the detail value interpretable by Icinga Notifications Web. For example, Icinga Notifications Web could use the state balls for a detail value of type severity if it's states explicitly that it's of type severity. Thus, I'll extend the DeliveryDetail type a bit to allow such kind of things.

@oxzi oxzi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, looks fine so far, thanks. I would approve it together with the Notifications PR.

Comment thread notifications/plugin/plugin.go Outdated

@oxzi oxzi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks again!

@oxzi
oxzi merged commit f9026eb into main Oct 16, 2026
17 of 18 checks passed
@oxzi
oxzi deleted the state-channels-v2 branch October 16, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants