upgrade-state: suppress known-benign Keel slack-bot-not-configured noise
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 <noreply@anthropic.com>
This commit is contained in:
parent
c9289192c7
commit
1cdccc1ad6
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue