Notifications: webhooks for a parked model, a lost node, a spent budget and new weights; Alertmanager receiver templates
notify.webhooks sends signed JSON or Slack-compatible messages, queued, retried, de-duplicated hourly; ctl notify test checks each webhook. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
646ff996c7
commit
1b71c38f89
24 files changed
+907
-4
No files matched your search
@@ -14,6 +14,8 @@ import (
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/control/reconciler"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/hf"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/mirror"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/notify"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/notify/notifytest"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -338,3 +340,15 @@ func TestAnOriginGivenByHandIsChecked(t *testing.T) {
|
||||
t.Fatalf("%+v", o)
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewWeightsAreToldOncePerRevision(t *testing.T) {
|
||||
s, _, _, _, _ := updSetup(t)
|
||||
n, sent := notifytest.Catch(t)
|
||||
s.deps.Notify = n
|
||||
s.CheckUpdates(context.Background())
|
||||
s.CheckUpdates(context.Background()) // still there: not told again
|
||||
got := sent()
|
||||
if len(got) != 1 || got[0].Kind != notify.UpdateAvailable || got[0].Detail["model"] != "qwen" {
|
||||
t.Fatalf("sent %+v, want one update_available for qwen", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user