feat(gateway): scope restart notifications to channel allowlists - #56015
Closed
walshg3 wants to merge 1 commit into
Closed
feat(gateway): scope restart notifications to channel allowlists#56015walshg3 wants to merge 1 commit into
walshg3 wants to merge 1 commit into
Conversation
Author
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gateway_restart_notification_channelsallowlists for gateway lifecycle/restart notifications.gateway.platforms.<platform>config, and document the config example.Default behavior is unchanged: if
gateway_restart_notification_channelsis unset, the platform behaves exactly as it did before.gateway_restart_notification: falseremains the coarse per-platform kill switch.Why
Multi-platform gateways often have several active chats, but restart lifecycle pings are operator noise. Users should be able to keep the signal in one ops/home channel without spraying Telegram, Discord, Slack, etc. chats that are not meant to receive operational lifecycle messages.
This is a narrower alternative/complement to the existing open restart-notification PRs:
gateway_restart_notification_channelsas a boolean to suppress bare channel/group notices.This PR keeps the existing delivery targets, but gates them through an explicit chat/channel ID allowlist. That makes the behavior easy to reason about and keeps current behavior as the unset default.
Test plan
python -m pytest tests/gateway/test_restart_notification.py tests/gateway/test_config.py -q -o 'addopts='Result:
109 passed, 2 warnings.