From a126f17cefc2acce6c8fc69ddf6e0740647e76a2 Mon Sep 17 00:00:00 2001 From: Renato Costa Date: Thu, 28 Mar 2024 13:29:33 -0400 Subject: [PATCH] roachtest: mark failures in `cluster.Install` as transient This function only runs a fixed set of installation commands. If they fail, we create an issue assigned to Test Eng and label the issue as an infra flake. Informs: #103316 Release note: None --- pkg/roachprod/install/install.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/roachprod/install/install.go b/pkg/roachprod/install/install.go index 02b504b23658..2de261d94c05 100644 --- a/pkg/roachprod/install/install.go +++ b/pkg/roachprod/install/install.go @@ -17,6 +17,7 @@ import ( "io" "sort" + rperrors "github.com/cockroachdb/cockroach/pkg/roachprod/errors" "github.com/cockroachdb/cockroach/pkg/roachprod/logger" ) @@ -194,5 +195,9 @@ func InstallTool( } // Ensure that we early exit if any of the shell statements fail. cmd = "set -exuo pipefail;" + cmd - return c.Run(ctx, l, stdout, stderr, WithNodes(nodes), "installing "+softwareName, cmd) + if err := c.Run(ctx, l, stdout, stderr, WithNodes(nodes), "installing "+softwareName, cmd); err != nil { + return rperrors.TransientFailure(err, "install_flake") + } + + return nil }