-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Bug: gateway_restart_notification config setting silently ignored #24644
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existsarea/configConfig system, migrations, profilesConfig system, migrations, profilescomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adapterTelegram bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current mainSweeper: behavior already present on current maintype/bugSomething isn't workingSomething isn't working
Metadata
Metadata
Assignees
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existsarea/configConfig system, migrations, profilesConfig system, migrations, profilescomp/gatewayGateway runner, session dispatch, deliveryGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adapterTelegram bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current mainSweeper: behavior already present on current maintype/bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug:
gateway_restart_notificationconfig setting has no effectProblem
The
PlatformConfig.gateway_restart_notificationfield exists on the dataclass (gateway/config.pyline 281), is serialized byto_dict(), and is parsed byfrom_dict(). However, setting it inconfig.yamlhas no effect — shutdown/restart notifications are always sent regardless of the setting.Root Cause
The config loader in
load_gateway_config()(lines 758–825) bridges specific keys from top-level platform sections (e.g.telegram:) inconfig.yamlinto the internal platforms dict. The bridge list includes keys likerequire_mention,dm_policy,group_policy, etc., butgateway_restart_notificationis missing from the bridge list.This means:
gateway_restart_notification: falseundertelegram:in config.yamlPlatformConfig.from_dict()never sees it → defaults toTruegateway/run.pyline 2767 always evaluates toTrue(send notification)Evidence
Gateway log shows notifications being sent despite
gateway_restart_notification: falsein config:Fix
Add
gateway_restart_notificationto the bridge list inload_gateway_config()(after line 800 ingateway/config.py):Related Issues
Environment