From 9e6c421cc5f18a1314e584a18fdcd3a7be304195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Wed, 29 Nov 2023 10:50:34 +0100 Subject: [PATCH] satellite/durability: report bus_factor with the new reports New instance based satellites are reporting durability alerts like `class=last_net, value=192.168.0.0`. Bus factor will be reported as `class=bus_factor value=last_net`. Change-Id: I0130866fa8e50b3d2876f580a78383bb1c609159 --- satellite/durability/observer.go | 1 + satellite/durability/observer_integration_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/satellite/durability/observer.go b/satellite/durability/observer.go index 0581e001f..91d300d6d 100644 --- a/satellite/durability/observer.go +++ b/satellite/durability/observer.go @@ -208,6 +208,7 @@ func (c *Report) Finish(ctx context.Context) error { for name, stat := range c.healthStat { c.reporter(reportTime, c.class, name, stat) } + c.reporter(reportTime, "bus_factor", c.class, &c.busFactor) return nil } diff --git a/satellite/durability/observer_integration_test.go b/satellite/durability/observer_integration_test.go index ff8e656e8..1e4f054a3 100644 --- a/satellite/durability/observer_integration_test.go +++ b/satellite/durability/observer_integration_test.go @@ -67,7 +67,7 @@ func TestDurabilityIntegration(t *testing.T) { _, err := rangedLoopService.RunOnce(ctx) require.NoError(t, err) - require.Len(t, result, 15) + require.Len(t, result, 19) // one or two pieces are controlled out of the 5-6 --> 3 or 4 pieces are available without HU nodes require.Equal(t, result["HU"].Min(), 4)