From 5ba89ced79cc0e987f04bfaf2e93a25534f6309f Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Wed, 26 Oct 2022 11:30:48 +0000 Subject: [PATCH] Increment metric on build start This metric was already configured and registered but never used. --- components/image-builder-mk3/pkg/orchestrator/orchestrator.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/image-builder-mk3/pkg/orchestrator/orchestrator.go b/components/image-builder-mk3/pkg/orchestrator/orchestrator.go index 77634b98783f8c..90faced5ddda13 100644 --- a/components/image-builder-mk3/pkg/orchestrator/orchestrator.go +++ b/components/image-builder-mk3/pkg/orchestrator/orchestrator.go @@ -268,6 +268,8 @@ func (o *Orchestrator) Build(req *protocol.BuildRequest, resp protocol.ImageBuil return nil } + o.metrics.BuildStarted() + // Once a build is running we don't want it cancelled becuase the server disconnected i.e. during deployment. // Instead we want to impose our own timeout/lifecycle on the build. Using context.WithTimeout does not shadow its parent's // cancelation (see https://play.golang.org/p/N3QBIGlp8Iw for an example/experiment).