diff --git a/pkg/cmd/roachtest/github.go b/pkg/cmd/roachtest/github.go index f520ff85573c..9d15c03200c6 100644 --- a/pkg/cmd/roachtest/github.go +++ b/pkg/cmd/roachtest/github.go @@ -111,7 +111,8 @@ func (g *githubIssues) createPostRequest( var mention []string var projColID int - issueOwner := t.Spec().(*registry.TestSpec).Owner + spec := t.Spec().(*registry.TestSpec) + issueOwner := spec.Owner issueName := t.Name() messagePrefix := "" @@ -129,7 +130,6 @@ func (g *githubIssues) createPostRequest( // Issues posted from roachtest are identifiable as such and // they are also release blockers (this label may be removed // by a human upon closer investigation). - spec := t.Spec().(*registry.TestSpec) labels := []string{"O-roachtest"} if !spec.NonReleaseBlocker { labels = append(labels, "release-blocker") @@ -174,12 +174,16 @@ func (g *githubIssues) createPostRequest( clusterParams[roachtestPrefix("encrypted")] = fmt.Sprintf("%v", g.cluster.encAtRest) } + issueMessage := messagePrefix + message + if spec.RedactResults { + issueMessage = "The details about this test failure have been omitted; consult the log for more details" + } return issues.PostRequest{ MentionOnCreate: mention, ProjectColumnID: projColID, PackageName: "roachtest", TestName: issueName, - Message: messagePrefix + message, + Message: issueMessage, Artifacts: artifacts, ExtraLabels: labels, ExtraParams: clusterParams, diff --git a/pkg/cmd/roachtest/registry/test_spec.go b/pkg/cmd/roachtest/registry/test_spec.go index fca4bb74e6e9..e5a3533bd3c2 100644 --- a/pkg/cmd/roachtest/registry/test_spec.go +++ b/pkg/cmd/roachtest/registry/test_spec.go @@ -92,6 +92,10 @@ type TestSpec struct { // Run is the test function. Run func(ctx context.Context, t test.Test, c cluster.Cluster) + + // True iff results from this test should not be published externally, + // e.g. to GitHub. + RedactResults bool } // PostValidation is a type of post-validation that runs after a test completes.