Skip to content

Commit

Permalink
Merge #99718
Browse files Browse the repository at this point in the history
99718: roachtest: anonymize failures of `workload-replay` in roachtest r=rytaft,renatolabs a=rickystewart

Epic: DEVINFHD-809
Release note: None

Co-authored-by: Ricky Stewart <[email protected]>
  • Loading branch information
craig[bot] and rickystewart committed Mar 30, 2023
2 parents 56bb002 + 35c4f24 commit dbf2dfb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/cmd/roachtest/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := ""
Expand All @@ -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")
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions pkg/cmd/roachtest/registry/test_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dbf2dfb

Please sign in to comment.