From 1cdccc1ad6fec502d576f89c57896420bd06d29a Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Mon, 18 May 2026 19:45:40 +0000 Subject: [PATCH] upgrade-state: suppress known-benign Keel slack-bot-not-configured noise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keel 1.2.0 registers a Slack socket-mode bot whenever SLACK_BOT_TOKEN is set, then fails because we don't supply an `xapp-` app-level token: bot.slack.Configure(): SLACK_APP_TOKEN must have the prefix "xapp-". bot.Run(): can not get configuration for bot [slack] We don't want the interactive bot — opt-out auto-update + no approval flow (see stacks/keel/main.tf comment). The Slack NOTIFICATION sender works independently and continues posting rollout messages to #general fine. But /upgrade-state's broad `grep level=error` was counting these as real errors → ⚠ on the Apps row every run. Add a small skip-pattern list so the two recurring benign lines drop out; any new genuine Keel error still shows. Reuses `bot.Run()` + `SLACK_APP_TOKEN must have the prev?if|prefix` (typo in Keel's actual log message preserved as alternation). Co-Authored-By: Claude Opus 4.7 --- scripts/upgrade_state.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade_state.sh b/scripts/upgrade_state.sh index 003996f0..f5735c07 100755 --- a/scripts/upgrade_state.sh +++ b/scripts/upgrade_state.sh @@ -183,7 +183,17 @@ except Exception: [[ -z "$updates_24h" ]] && updates_24h=0 APPS_UPDATES_LINE="$updates_24h in last 24h (tracked images: $tracked)" - errors=$(echo "$log_24h" | grep -iE '"level":"(error|fatal)"|level=error' | tail -3 || true) + # Known-benign Keel error patterns to suppress. Each is a real error + # line Keel emits, but the surrounding behaviour is fine, so flagging + # them in /upgrade-state is just noise. + # - `bot.Run(): can not get configuration for bot [slack]` — Keel + # 1.2.0 registers a Slack socket-mode bot whenever SLACK_BOT_TOKEN + # is set, then fails because we don't supply an `xapp-` app-level + # token. We don't want the interactive bot (no approvals; opt-out + # auto-update). The Slack NOTIFICATION sender works independently + # of the bot, so rollout messages still post to #general. + local benign_re='bot\.Run\(\): can not get configuration for bot \[slack\]|SLACK_APP_TOKEN must have the (previf|prefix)' + errors=$(echo "$log_24h" | grep -iE '"level":"(error|fatal)"|level=error' | grep -vE "$benign_re" | tail -3 || true) if [[ -z "$errors" ]]; then APPS_ERROR_LINE="(none in last 24h)" else