From 7a94449539d6a6557d54706e49c72cf1d7cee558 Mon Sep 17 00:00:00 2001 From: "khr@golang.org" Date: Mon, 30 Dec 2024 13:05:47 -0800 Subject: [PATCH] internal/gaby: remove rules poster event watcher bootstrap Change-Id: I86f62045f3e3396cf72c6277420573acef978593 Reviewed-on: https://go-review.googlesource.com/c/oscar/+/638437 Reviewed-by: Keith Randall Reviewed-by: Jonathan Amsterdam LUCI-TryBot-Result: Go LUCI --- internal/gaby/main.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/internal/gaby/main.go b/internal/gaby/main.go index 64215ee..9e86057 100644 --- a/internal/gaby/main.go +++ b/internal/gaby/main.go @@ -49,7 +49,6 @@ import ( "golang.org/x/oscar/internal/secret" "golang.org/x/oscar/internal/storage" "golang.org/x/oscar/internal/storage/timed" - "rsc.io/ordered" ) type gabyFlags struct { @@ -225,23 +224,6 @@ func main() { if !slices.Contains(autoApprovePkgs, "rules") { rulep.RequireApproval() } - if true { // TODO: remove once launched - if _, ok := g.db.Get(ordered.Encode("github.EventWatcher", "rules.Poster:rules")); !ok { - // For testing (and startup). Set a timestamp 1 hour before - // the related issue poster. - qq, ok := g.db.Get(ordered.Encode("github.EventWatcher", "related.Poster:related")) - if !ok { - panic("can't find key") - } - var t int64 - err := ordered.Decode(qq, &t) - if err != nil { - panic(err) - } - t -= 5 * 60 * 60 * 1e9 // back up 1 hour - g.db.Set(ordered.Encode("github.EventWatcher", "rules.Poster:rules"), ordered.Encode(t)) - } - } g.rulesPoster = rulep // Named functions to retrieve latest Watcher times.