diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/BUILD.bazel b/pkg/cmd/roachtest/roachtestutil/mixedversion/BUILD.bazel index ac9af24b09ff..e12562cf1509 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/BUILD.bazel +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/BUILD.bazel @@ -13,6 +13,7 @@ go_library( importpath = "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/mixedversion", visibility = ["//visibility:public"], deps = [ + "//pkg/cmd/roachprod/grafana", "//pkg/cmd/roachtest/cluster", "//pkg/cmd/roachtest/option", "//pkg/cmd/roachtest/roachtestutil", diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/runner.go b/pkg/cmd/roachtest/roachtestutil/mixedversion/runner.go index 5a65d7b83d3c..aafcaaf53cef 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/runner.go +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/runner.go @@ -26,6 +26,7 @@ import ( "text/tabwriter" "time" + "github.com/cockroachdb/cockroach/pkg/cmd/roachprod/grafana" "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster" "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option" "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/clusterupgrade" @@ -242,6 +243,13 @@ func (tr *testRunner) runSingleStep(ctx context.Context, ss *singleStep, l *logg defer func() { prefix := fmt.Sprintf("FINISHED [%s]", timeutil.Since(start)) tr.logStep(prefix, ss, l) + annotation := fmt.Sprintf("(%d): %s", ss.ID, ss.impl.Description()) + _, err := tr.cluster.AddGrafanaAnnotation(tr.ctx, tr.logger, false /*internal*/, grafana.AddAnnotationRequest{ + Text: annotation, StartTime: start.UnixMilli(), EndTime: timeutil.Now().UnixMilli(), + }) + if err != nil { + l.Printf("Adding Grafana annotation failed: %s", err) + } }() if err := panicAsError(l, func() error {