Skip to content

Commit

Permalink
AT-1723 Automated created YT issues from IJ-Perf for unit performance…
Browse files Browse the repository at this point in the history
… metrics do not contain snapshots before regression and after
  • Loading branch information
MaXal committed Nov 27, 2024
1 parent 34733b0 commit 992d71c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/server/meta/youtrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ func (f fleetPerfTestCollector) checkArtifact(artifactName string) bool {
return artifactName == "logs.zip"
}

type perfUnitTestCollector struct{}

func (f perfUnitTestCollector) getArtifactsPath(params UploadAttachmentsToIssueRequest) string {
return strings.ReplaceAll(params.AffectedTest, "_", "-")
}

func (f perfUnitTestCollector) checkArtifact(artifactName string) bool {
return artifactName == "log.zip"
}

type perfintCollector struct{}

func (f perfintCollector) getArtifactsPath(params UploadAttachmentsToIssueRequest) string {
Expand All @@ -216,6 +226,8 @@ func getArtifactCollector(testType string) artifactCollector {
return perfintCollector{}
case "fleet_perf":
return fleetPerfTestCollector{}
case "perfUnitTests":
return perfUnitTestCollector{}
default:
return nil
}
Expand Down Expand Up @@ -377,6 +389,12 @@ func generateDescription(generateDescriptorData GenerateDescriptionData) string
parts = append(parts, logs, snapshots)
}

if generateDescriptorData.TestType == "perfUnitTests" {
snapshots := "**Snapshots:**\nCurrent: [log-current.zip](log-current.zip)"
snapshots += "\nBefore: [log-before.zip](log-before.zip)"
parts = append(parts, snapshots)
}

// Dashboard
if generateDescriptorData.DashboardLink != "" {
parts = append(parts, fmt.Sprintf("**Chart:**\n[link to test chart](%s)", generateDescriptorData.DashboardLink), "![](dashboard.png)")
Expand Down

0 comments on commit 992d71c

Please sign in to comment.