From c48c9cac57363ca19866f4c66ba343acaaf4e8e6 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 13:23:11 -0400 Subject: [PATCH 1/7] Manually update 2 deps that the Dependabot PR#150 can't build --- go.mod | 10 ++++++---- go.sum | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 7d4d79b9..a171d7bc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/cashapp/blip -go 1.19 +go 1.23.0 + +toolchain go1.24.2 require ( github.com/DataDog/datadog-api-client-go/v2 v2.2.0 @@ -25,7 +27,7 @@ require ( github.com/prometheus/common v0.44.0 github.com/signalfx/golib/v3 v3.3.36 github.com/stretchr/testify v1.8.4 - golang.org/x/text v0.14.0 + golang.org/x/text v0.25.0 google.golang.org/protobuf v1.33.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -69,9 +71,9 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.40.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/sys v0.33.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index d1acf91e..b2204040 100644 --- a/go.sum +++ b/go.sum @@ -241,6 +241,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= @@ -265,12 +267,16 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 3b7d7fa8f7b41a579130c7ae6ab07a96b5a7ab87 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 19:58:54 -0400 Subject: [PATCH 2/7] Update go version in go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a171d7bc..09dd0c08 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cashapp/blip -go 1.23.0 +go 1.24.0 toolchain go1.24.2 From f9d6c0a5990c2d9f453bdedb8ea860302347886e Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 20:00:39 -0400 Subject: [PATCH 3/7] go mod tidy and remove toolchain directive --- go.mod | 2 -- go.sum | 17 +++++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 09dd0c08..5be59c40 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/cashapp/blip go 1.24.0 -toolchain go1.24.2 - require ( github.com/DataDog/datadog-api-client-go/v2 v2.2.0 github.com/DataDog/datadog-go/v5 v5.1.1 diff --git a/go.sum b/go.sum index b2204040..a73a6693 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,7 @@ github.com/DataDog/datadog-go/v5 v5.1.1/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTo github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -56,6 +57,7 @@ github.com/aws/smithy-go v1.9.1/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAm github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -76,7 +78,9 @@ github.com/go-ini/ini v1.64.0 h1:73w/ADE+yoYjfu4BlI/LaEMe9Do1zOQ6qPt1du4uikI= github.com/go-ini/ini v1.64.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= @@ -117,6 +121,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -143,9 +148,11 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -169,6 +176,7 @@ github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPH github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/shirou/gopsutil v2.18.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= @@ -188,6 +196,7 @@ github.com/smartystreets/goconvey v1.6.4-0.20190306220146-200a235640ff h1:JcVn27 github.com/smartystreets/goconvey v1.6.4-0.20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -212,6 +221,7 @@ go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLk go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= @@ -239,8 +249,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -265,16 +273,12 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -308,6 +312,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From c1ccbcdf8665f9c066f5752fd7db05acb8e85867 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 20:02:00 -0400 Subject: [PATCH 4/7] Fix go.mod again --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5be59c40..3d064c86 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cashapp/blip -go 1.24.0 +go 1.24 require ( github.com/DataDog/datadog-api-client-go/v2 v2.2.0 From 6f4b0efa93f406e2074de4d1f271e6d68aa6a350 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 20:03:40 -0400 Subject: [PATCH 5/7] Build on go1.24, not 1.19 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b930c5f..1ae854f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.24 - name: Build run: go build -v ./... From f4211807dcb0a6f614705c4f8730297fb6d8a8a4 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 20:15:43 -0400 Subject: [PATCH 6/7] Fix go1.24 strict printf const linting --- sink/chronosphere.go | 4 ++-- sink/datadog.go | 4 ++-- sink/retry.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sink/chronosphere.go b/sink/chronosphere.go index dd2f5c10..a691838c 100644 --- a/sink/chronosphere.go +++ b/sink/chronosphere.go @@ -89,7 +89,7 @@ func (s *Chronosphere) Send(ctx context.Context, m *blip.Metrics) (lerr error) { if lerr == nil { status.Monitor(s.monitorId, "chronosphere", "last sent %d metrics at %s", n, time.Now()) } else { - s.event.Errorf(event.SINK_SEND_ERROR, lerr.Error()) + s.event.Errorf(event.SINK_SEND_ERROR, "%s", lerr.Error()) status.Monitor(s.monitorId, "chronosphere", "error on last send at %s: %s", time.Now(), lerr) } }() @@ -187,7 +187,7 @@ func (s *Chronosphere) Send(ctx context.Context, m *blip.Metrics) (lerr error) { n++ // next metric: fam[n] } // each metric in a Blip domain - } //each Blip domain + } // each Blip domain // If config.sinks.chronosphere.debug=true, then just print via debug, don't send if s.debug { diff --git a/sink/datadog.go b/sink/datadog.go index 8a16341c..5623545c 100644 --- a/sink/datadog.go +++ b/sink/datadog.go @@ -342,7 +342,7 @@ func (s *Datadog) Send(ctx context.Context, m *blip.Metrics) error { // This shouldn't happen: >0 Blip metrics in but =0 Datadog data points out if n == 0 { errMsg := fmt.Sprintf("zero data points created after processing Blip metrics: %s", m) - s.event.Errorf(event.SINK_INVALID_METRICS, errMsg) + s.event.Errorf(event.SINK_INVALID_METRICS, "%s", errMsg) return nil // do not retry } @@ -408,7 +408,7 @@ func (s *Datadog) sendApi(ddCtx context.Context, dp []datadogV2.MetricSeries) er // This probably means partial success, so keep sending but log the error. if len(apiResponse.Errors) > 0 { errMsg := fmt.Sprintf("Datadog returned success and %d errors: %s", len(apiResponse.Errors), strings.Join(apiResponse.Errors, ", ")) - s.event.Errorf(event.SINK_SERVER_ERROR, errMsg) + s.event.Errorf(event.SINK_SERVER_ERROR, "%s", errMsg) } rangeStart = rangeEnd diff --git a/sink/retry.go b/sink/retry.go index 0aed3d2d..738b738f 100644 --- a/sink/retry.go +++ b/sink/retry.go @@ -142,7 +142,7 @@ func (rb *Retry) Send(ctx context.Context, m *blip.Metrics) error { // Send next oldest metrics if err := rb.sink.Send(ctx, next); err != nil { - rb.event.Errorf(event.SINK_SEND_ERROR, err.Error()) + rb.event.Errorf(event.SINK_SEND_ERROR, "%s", err.Error()) next = nil // don't pop metrics; retry stack from top down } } From 5ed189ad0ab9ade8a40ab95d825a41fa716229dc Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Thu, 15 May 2025 20:45:17 -0400 Subject: [PATCH 7/7] Fix all go vet non-constant string errors --- event/event.go | 25 +++++++++++++++++++++---- heartbeat/reader.go | 12 +++++++----- monitor/engine.go | 25 ++++++++++++------------- monitor/level_collector.go | 30 ++++++++++++++++-------------- monitor/loader.go | 8 +++++--- monitor/monitor.go | 10 +++++----- monitor/plan_changer.go | 2 +- plan/loader.go | 2 +- server/api.go | 2 +- server/server.go | 18 +++++++++--------- 10 files changed, 78 insertions(+), 56 deletions(-) diff --git a/event/event.go b/event/event.go index d087e92a..9d45f9cb 100644 --- a/event/event.go +++ b/event/event.go @@ -58,8 +58,10 @@ func SetReceiver(r Receiver) { return } -var subscribers = []Receiver{} -var submux = &sync.Mutex{} +var ( + subscribers = []Receiver{} + submux = &sync.Mutex{} +) func Subscribe(r Receiver) { submux.Lock() @@ -90,6 +92,15 @@ func Sendf(eventName string, msg string, args ...interface{}) { }) } +func Error(eventName string, msg string) { + send(Event{ + Ts: time.Now(), + Event: eventName, + Message: msg, + Error: true, + }) +} + // Errorf sends an event flagged as an error with a formatted message. func Errorf(eventName string, msg string, args ...interface{}) { send(Event{ @@ -139,6 +150,10 @@ func (s MonitorReceiver) Sendf(eventName string, msg string, args ...interface{} }) } +func (s MonitorReceiver) Error(eventName string, msg string) { + s.Errorf(eventName, "%s", msg) +} + func (s MonitorReceiver) Errorf(eventName string, msg string, args ...interface{}) { send(Event{ Ts: time.Now(), @@ -151,8 +166,10 @@ func (s MonitorReceiver) Errorf(eventName string, msg string, args ...interface{ // -------------------------------------------------------------------------- -var stdout = log.New(os.Stdout, "", log.LstdFlags|log.Lmicroseconds) -var stderr = log.New(os.Stderr, "", log.LstdFlags|log.Lmicroseconds) +var ( + stdout = log.New(os.Stdout, "", log.LstdFlags|log.Lmicroseconds) + stderr = log.New(os.Stderr, "", log.LstdFlags|log.Lmicroseconds) +) // Log is the default Receiver that uses the Go built-in log package to print // certain events to STDOUT and error events to STDERR. Call SetReceiver to diff --git a/heartbeat/reader.go b/heartbeat/reader.go index 95c31d45..e179dde4 100644 --- a/heartbeat/reader.go +++ b/heartbeat/reader.go @@ -33,10 +33,12 @@ type Lag struct { Replica bool } -var ReadTimeout = 2 * time.Second -var ReadErrorWait = 1 * time.Second -var NoHeartbeatWait = 3 * time.Second -var ReplCheckWait = 3 * time.Second +var ( + ReadTimeout = 2 * time.Second + ReadErrorWait = 1 * time.Second + NoHeartbeatWait = 3 * time.Second + ReplCheckWait = 3 * time.Second +) // BlipReader reads heartbeats from BlipWriter. type BlipReader struct { @@ -165,7 +167,7 @@ func (r *BlipReader) run() { r.Unlock() msg := fmt.Sprintf("not a replica: %s=%d (retry in %s)", r.replCheck, isRepl, ReplCheckWait) blip.Debug("%s: %s", r.monitorId, msg) - status.Monitor(r.monitorId, status.HEARTBEAT_READER, msg) + status.Monitor(r.monitorId, status.HEARTBEAT_READER, "%s", msg) time.Sleep(ReplCheckWait) continue } diff --git a/monitor/engine.go b/monitor/engine.go index 62c1c920..44482486 100644 --- a/monitor/engine.go +++ b/monitor/engine.go @@ -93,16 +93,16 @@ func (e *Engine) DB() *sql.DB { // calls. Serialization is handled by the only caller: LevelCollector.ChangePlan(). func (e *Engine) Prepare(ctx context.Context, plan blip.Plan, before, after func()) error { blip.Debug("%s: prepare %s (%s)", e.monitorId, plan.Name, plan.Source) - e.event.Sendf(event.ENGINE_PREPARE, plan.Name) - status.Monitor(e.monitorId, status.ENGINE_PREPARE, plan.Name) + e.event.Sendf(event.ENGINE_PREPARE, "%s", plan.Name) + status.Monitor(e.monitorId, status.ENGINE_PREPARE, "%s", plan.Name) defer status.RemoveComponent(e.monitorId, status.ENGINE_PREPARE) // Report last error, if any var lerr error defer func() { if lerr != nil { - e.event.Errorf(event.ENGINE_PREPARE_ERROR, lerr.Error()) - status.Monitor(e.monitorId, "error:"+status.ENGINE_PREPARE, lerr.Error()) + e.event.Error(event.ENGINE_PREPARE_ERROR, lerr.Error()) + status.Monitor(e.monitorId, "error:"+status.ENGINE_PREPARE, "%s", lerr.Error()) } else { // success status.RemoveComponent(e.monitorId, "error:"+status.ENGINE_PREPARE) @@ -233,8 +233,8 @@ func (e *Engine) Prepare(ctx context.Context, plan blip.Plan, before, after func e.Unlock() // UNLOCK plan --------------------------------------- - status.Monitor(e.monitorId, status.ENGINE_PLAN, plan.Name) - e.event.Sendf(event.ENGINE_PREPARE_SUCCESS, plan.Name) + status.Monitor(e.monitorId, status.ENGINE_PLAN, "%s", plan.Name) + e.event.Sendf(event.ENGINE_PREPARE_SUCCESS, "%s", plan.Name) status.Monitor(e.monitorId, status.ENGINE_PREPARE, "%s: level-collector after callback", plan.Name) after() // notify caller (lco.changePlan) that we have swapped the plan @@ -271,10 +271,10 @@ func (e *Engine) Collect(emrCtx context.Context, interval uint, levelName string } if domains == nil { blip.Debug("Engine.Stop was called, dropping interval %d level %s", interval, levelName) - return []*blip.Metrics{&blip.Metrics{Values: map[string][]blip.MetricValue{}}}, nil // see return guarantee in Collect comment + return []*blip.Metrics{{Values: map[string][]blip.MetricValue{}}}, nil // see return guarantee in Collect comment } blip.Debug("%s: %s: collect", e.monitorId, coId) - status.Monitor(e.monitorId, status.ENGINE_COLLECT, coId+": collecting") + status.Monitor(e.monitorId, status.ENGINE_COLLECT, "%s", coId+": collecting") // Collect metrics for each domain in parallel (limit: CollectParallel) sem := make(chan bool, CollectParallel) // semaphore for CollectParallel @@ -362,7 +362,7 @@ SWEEP: metrics[0].End = time.Now() // Log collector errors and update collector status - status.Monitor(e.monitorId, status.ENGINE_COLLECT, coId+": logging errors") + status.Monitor(e.monitorId, status.ENGINE_COLLECT, "%s", coId+": logging errors") errCount := 0 for domain, err := range errs { switch err { @@ -376,7 +376,7 @@ SWEEP: errCount += 1 errMsg := fmt.Sprintf("%s/%s: %s", coId, domain, err) status.Monitor(e.monitorId, "error:"+domain, "at %s: %s", metrics[0].Begin, errMsg) - e.event.Errorf(event.COLLECTOR_ERROR, errMsg) // log by default + e.event.Error(event.COLLECTOR_ERROR, errMsg) // log by default } } @@ -493,7 +493,7 @@ func (cl *clutch) collect(m blip.Metrics, sem chan bool) { if cl.running { // Collector fault: it didn't terminate itself at CMR - cl.event.Errorf(event.COLLECTOR_FAULT, fmt.Sprintf("%s: metrics from interval %d will be dropped if the collector recovers: %+v", cl.domain, cl.m.Interval, cl)) + cl.event.Errorf(event.COLLECTOR_FAULT, "%s: metrics from interval %d will be dropped if the collector recovers: %+v", cl.domain, cl.m.Interval, cl) cl.fence = m.Interval if cl.cancel != nil { cl.cancel() @@ -546,7 +546,7 @@ func (cl *clutch) collect(m blip.Metrics, sem chan bool) { b := make([]byte, 4096) n := runtime.Stack(b, false) perr := fmt.Errorf("PANIC: monitor ID %s: %s: %v\n%s", cl.m.MonitorId, cl.domain, r, string(b[0:n])) - cl.event.Errorf(event.COLLECTOR_PANIC, perr.Error()) + cl.event.Error(event.COLLECTOR_PANIC, perr.Error()) } cancel() // local cancel, not cl.cancel, in case goroutine is behind the fence cl.Lock() @@ -562,7 +562,6 @@ func (cl *clutch) collect(m blip.Metrics, sem chan bool) { cl.domain, cl.stopTime.Sub(cl.startTime), cl.pending, cl.err) } cl.Unlock() - }() // ---------------------------------------------------------------------- diff --git a/monitor/level_collector.go b/monitor/level_collector.go index 9361251f..0db48807 100644 --- a/monitor/level_collector.go +++ b/monitor/level_collector.go @@ -108,9 +108,11 @@ func TickerDuration(d, e time.Duration) { // act like 1s has elapsed. This is for test plans with realistic whole-second // durations. The RBB tests use 100ms/100ms because that test plan is design for // 100ms intervals, so it can run through 5 intervals in about 500ms. -var tickerMux = &sync.Mutex{} // make go test -race happy -var tickerDuration = 1 * time.Second // used for testing -var timeElapsed = 1 * time.Second // used for testing +var ( + tickerMux = &sync.Mutex{} // make go test -race happy + tickerDuration = 1 * time.Second // used for testing + timeElapsed = 1 * time.Second // used for testing +) // recvMetrics receives metrics on metricsChan and send them to all the sinks. // This is a goroutine run by keepRecvMetrics and restarted by keepRecvMetrics @@ -123,7 +125,7 @@ func (c *lco) recvMetrics(stopSinksChan, doneChan chan struct{}) { b := make([]byte, 4096) n := runtime.Stack(b, false) perr := fmt.Errorf("PANIC: sinks: %s: %v\n%s", c.monitorId, r, string(b[0:n])) - c.event.Errorf(event.LCO_RECEIVER_PANIC, perr.Error()) + c.event.Error(event.LCO_RECEIVER_PANIC, perr.Error()) } }() RECV: @@ -145,11 +147,11 @@ RECV: coId := fmt.Sprintf("%s/%s/%d", m.Plan, m.Level, m.Interval) for _, sink := range c.sinks { sinkName := sink.Name() - status.Monitor(c.monitorId, status.LEVEL_SINKS, coId+": sending to "+sinkName) + status.Monitor(c.monitorId, status.LEVEL_SINKS, "%s", coId+": sending to "+sinkName) err := sink.Send(context.Background(), m) // @todo ctx with timeout if err != nil { c.event.Errorf(event.SINK_SEND_ERROR, "%s :%s", sinkName, err) // log by default - status.Monitor(c.monitorId, "error:"+sinkName, err.Error()) + status.Monitor(c.monitorId, "error:"+sinkName, "%s", err.Error()) } else { status.RemoveComponent(c.monitorId, "error:"+sinkName) } @@ -279,8 +281,8 @@ func (c *lco) collect(interval uint, levelName string, startTime time.Time) { blip.Debug("%s: level %s: done in %s", c.monitorId, levelName, metrics[0].End.Sub(metrics[0].Begin)) if err != nil { - status.Monitor(c.monitorId, "error:collect", err.Error()) - c.event.Errorf(event.ENGINE_COLLECT_ERROR, err.Error()) + status.Monitor(c.monitorId, "error:collect", "%s", err.Error()) + c.event.Error(event.ENGINE_COLLECT_ERROR, err.Error()) } else { status.RemoveComponent(c.monitorId, "error:collect") } @@ -368,7 +370,7 @@ func (c *lco) changePlan(ctx context.Context, doneChan chan struct{}, newState, oldPlanName := c.plan.Name c.stateMux.Unlock() change := fmt.Sprintf("state:%s plan:%s -> state:%s plan:%s", oldState, oldPlanName, newState, newPlanName) - c.event.Sendf(event.CHANGE_PLAN, change) + c.event.Sendf(event.CHANGE_PLAN, "%s", change) // Load new plan from plan loader, which contains all plans. Try forever because // that's what this func/gouroutine does: try forever (caller's expect that). @@ -385,8 +387,8 @@ func (c *lco) changePlan(ctx context.Context, doneChan chan struct{}, newState, } errMsg := fmt.Sprintf("%s: error loading new plan %s: %s (retrying)", change, newPlanName, err) - status.Monitor(c.monitorId, status.LEVEL_CHANGE_PLAN, errMsg) - c.event.Sendf(event.CHANGE_PLAN_ERROR, errMsg) + status.Monitor(c.monitorId, status.LEVEL_CHANGE_PLAN, "%s", errMsg) + c.event.Sendf(event.CHANGE_PLAN_ERROR, "%s", errMsg) time.Sleep(2 * time.Second) } @@ -428,8 +430,8 @@ func (c *lco) changePlan(ctx context.Context, doneChan chan struct{}, newState, // Changing state/plan always resumes (if paused); in fact, it's the // only way to resume after Pause is called c.paused = false - status.Monitor(c.monitorId, status.LEVEL_STATE, newState) - status.Monitor(c.monitorId, status.LEVEL_PLAN, newPlan.Name) + status.Monitor(c.monitorId, status.LEVEL_STATE, "%s", newState) + status.Monitor(c.monitorId, status.LEVEL_PLAN, "%s", newPlan.Name) status.Monitor(c.monitorId, status.LEVEL_COLLECTOR, "running since %s", blip.FormatTime(time.Now())) blip.Debug("%s: resume", c.monitorId) @@ -466,7 +468,7 @@ func (c *lco) changePlan(ctx context.Context, doneChan chan struct{}, newState, } status.RemoveComponent(c.monitorId, status.LEVEL_CHANGE_PLAN) - c.event.Sendf(event.CHANGE_PLAN_SUCCESS, change) + c.event.Sendf(event.CHANGE_PLAN_SUCCESS, "%s", change) } // Pause pauses metrics collection until ChangePlan is called. Run still runs, diff --git a/monitor/loader.go b/monitor/loader.go index 8335957c..5181d458 100644 --- a/monitor/loader.go +++ b/monitor/loader.go @@ -168,8 +168,10 @@ func (ml *Loader) start(m *loadedMonitor) error { // [ 1, 10) = <1s startup // [10, 50] = ~1s // (50,inf) = >1s + 1s per 50 [e.g. 100=2s, 200=4s] -const min_wait = 20 -const max_wait = 100 +const ( + min_wait = 20 + max_wait = 100 +) func wait(n int) int { if n <= 1 { @@ -243,7 +245,7 @@ func (ml *Loader) Load(ctx context.Context) error { } } if errMsg != "" { - event.Errorf(event.MONITORS_STOPLOSS, errMsg) + event.Error(event.MONITORS_STOPLOSS, errMsg) return ErrStopLoss } } diff --git a/monitor/monitor.go b/monitor/monitor.go index 83aaa246..04e1e747 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -155,7 +155,7 @@ func (m *Monitor) Stop() error { m.db.Close() } - event.Sendf(event.MONITOR_STOPPED, m.monitorId) + event.Sendf(event.MONITOR_STOPPED, "%s", m.monitorId) status.Monitor(m.monitorId, status.MONITOR, "stopped at %s", blip.FormatTime(time.Now())) return nil } @@ -259,7 +259,7 @@ func (m *Monitor) startup() error { m.runMux.Lock() m.db = db m.dsn = dsnRedacted - status.Monitor(m.monitorId, status.MONITOR_DSN, dsnRedacted) + status.Monitor(m.monitorId, status.MONITOR_DSN, "%s", dsnRedacted) m.runMux.Unlock() break } @@ -377,7 +377,7 @@ func (m *Monitor) startup() error { if m.cfg.Exporter.Mode == blip.EXPORTER_MODE_LEGACY { blip.Debug("%s: legacy mode", m.monitorId) status.Monitor(m.monitorId, status.MONITOR, "running in exporter legacy mode") - m.event.Sendf(event.MONITOR_STARTED, m.dsn) + m.event.Sendf(event.MONITOR_STARTED, "%s", m.dsn) return nil } } @@ -452,7 +452,7 @@ func (m *Monitor) startup() error { m.lco.ChangePlan(blip.STATE_ACTIVE, m.cfg.Plan) // start LCO directly } - m.event.Sendf(event.MONITOR_STARTED, m.dsn) + m.event.Sendf(event.MONITOR_STARTED, "%s", m.dsn) return nil } @@ -491,7 +491,7 @@ func (m *Monitor) stop(lock bool, caller string) { func (m *Monitor) setErr(err error, isPanic bool) { if err != nil { - m.event.Errorf(event.MONITOR_ERROR, err.Error()) + m.event.Error(event.MONITOR_ERROR, err.Error()) status.Monitor(m.monitorId, "error:"+status.MONITOR, "error: %s", err) } else { status.RemoveComponent(m.monitorId, "error:"+status.MONITOR) diff --git a/monitor/plan_changer.go b/monitor/plan_changer.go index fc5dcba6..8865821f 100644 --- a/monitor/plan_changer.go +++ b/monitor/plan_changer.go @@ -115,7 +115,7 @@ func NewPlanChanger(args PlanChangerArgs) *planChanger { // setErr sets the last internal error reported by Status. func (pch *planChanger) setErr(err error) { if err != nil { - status.Monitor(pch.monitorId, "error:"+status.PLAN_CHANGER, err.Error()) + status.Monitor(pch.monitorId, "error:"+status.PLAN_CHANGER, "%s", err.Error()) } else { status.RemoveComponent(pch.monitorId, "error:"+status.PLAN_CHANGER) } diff --git a/plan/loader.go b/plan/loader.go index c76bf6b4..c75511d9 100644 --- a/plan/loader.go +++ b/plan/loader.go @@ -171,7 +171,7 @@ func (pl *Loader) LoadShared(cfg blip.ConfigPlans, dbMaker blip.DbFactory) error // LoadMonitor loads monitor plans: config.monitors.*.Plans. func (pl *Loader) LoadMonitor(mon blip.ConfigMonitor, dbMaker blip.DbFactory) error { - event.Sendf(event.PLANS_LOAD_MONITOR, mon.MonitorId) + event.Sendf(event.PLANS_LOAD_MONITOR, "%s", mon.MonitorId) if mon.Plans.Table == "" && len(mon.Plans.Files) == 0 { blip.Debug("monitor %s uses only shared plans", mon.MonitorId) diff --git a/server/api.go b/server/api.go index 5fab7971..24bb045c 100644 --- a/server/api.go +++ b/server/api.go @@ -89,7 +89,7 @@ func (api *API) Run() error { blip.Debug("shutdown") return nil default: - event.Errorf(event.SERVER_API_ERROR, err.Error()) + event.Errorf(event.SERVER_API_ERROR, "%s", err.Error()) time.Sleep(1 * time.Second) // between crashes } } diff --git a/server/server.go b/server/server.go index ff8c9d80..32625c67 100644 --- a/server/server.go +++ b/server/server.go @@ -108,7 +108,7 @@ func (s *Server) Boot(env blip.Env, plugins blip.Plugins, factories blip.Factori os.Exit(0) } if s.cmdline.Options.PrintDomains { - fmt.Fprintf(os.Stdout, metrics.PrintDomains()) + fmt.Fprintf(os.Stdout, "%s", metrics.PrintDomains()) os.Exit(0) } @@ -120,9 +120,9 @@ func (s *Server) Boot(env blip.Env, plugins blip.Plugins, factories blip.Factori event.SetReceiver(event.Log{All: s.cmdline.Options.Log}) event.Sendf(event.BOOT_START, "blip %s", blip.VERSION) // very first event - status.Blip("started", blip.FormatTime(startTs)) - status.Blip("version", blip.VERSION) - status.Blip(status.SERVER, "booting") + status.Blip("started", "%s", blip.FormatTime(startTs)) + status.Blip("version", "%s", blip.VERSION) + status.Blip(status.SERVER, "%s", "booting") // ---------------------------------------------------------------------- // Load config @@ -153,13 +153,13 @@ func (s *Server) Boot(env blip.Env, plugins blip.Plugins, factories blip.Factori s.cfg.ApplyDefaults(blip.DefaultConfig()) } if err != nil { - event.Sendf(event.BOOT_ERROR, err.Error()) + event.Sendf(event.BOOT_ERROR, "%s", err.Error()) //nolint:vet return err } s.cfg.InterpolateEnvVars() blip.Debug("config: %#v", s.cfg) if err := s.cfg.Validate(); err != nil { - event.Errorf(event.BOOT_CONFIG_INVALID, err.Error()) + event.Errorf(event.BOOT_CONFIG_INVALID, "%s", err.Error()) return err } event.Send(event.BOOT_CONFIG_LOADED) @@ -194,7 +194,7 @@ func (s *Server) Boot(env blip.Env, plugins blip.Plugins, factories blip.Factori s.planLoader = plan.NewLoader(plugins.LoadPlans) if err := s.planLoader.LoadShared(s.cfg.Plans, factories.DbConn); err != nil { - event.Sendf(event.BOOT_ERROR, err.Error()) + event.Sendf(event.BOOT_ERROR, "%s", err.Error()) return err } @@ -215,7 +215,7 @@ func (s *Server) Boot(env blip.Env, plugins blip.Plugins, factories blip.Factori RDSLoader: aws.RDSLoader{ClientFactory: aws.NewRDSClientFactory(factories.AWSConfig)}, }) if err := s.monitorLoader.Load(context.Background()); err != nil { - event.Sendf(event.BOOT_ERROR, err.Error()) + event.Sendf(event.BOOT_ERROR, "%s", err.Error()) return err } @@ -246,7 +246,7 @@ func (s *Server) Run(stopChan, doneChan chan struct{}) error { stopReason := "unknown" defer func() { - event.Errorf(event.SERVER_STOPPED, stopReason) + event.Errorf(event.SERVER_STOPPED, "%s", stopReason) }() // Start all monitors. Then if config.monitor-load.freq is specified, start