Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Oct 1, 2024
1 parent 2f05fd8 commit b0fe29a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/gradlecheck/FetchPostMergeFailedTestClass.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ class FetchPostMergeFailedTestClass {

def getPostMergeFailedTestClass(timeFrame) {
def jsonResponse = new OpenSearchMetricsQuery(metricsUrl,awsAccessKey, awsSecretKey, awsSessionToken, script).fetchMetrics(getQuery(timeFrame))
println(jsonResponse)
def keys = jsonResponse.aggregations.test_class_keyword_agg.buckets.collect { it.key }
println(keys)
return keys
}
}
3 changes: 2 additions & 1 deletion src/gradlecheck/OpenSearchMetricsQuery.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ class OpenSearchMetricsQuery {
set -e
set +x
MONTH_YEAR=\$(date +"%m-%Y")
curl -s -XGET "${metricsUrl}/gradle-check-*/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.'
curl -XGET "${metricsUrl}/gradle-check-*/_search" --aws-sigv4 "aws:amz:us-east-1:es" --user "${awsAccessKey}:${awsSecretKey}" -H "x-amz-security-token:${awsSessionToken}" -H 'Content-Type: application/json' -d "${query}" | jq '.'
""",
returnStdout: true
).trim()
println("The response OpenSearchMetricsQuery is" + response)
return new JsonSlurper().parseText(response)
}
}
4 changes: 2 additions & 2 deletions vars/gradleCheckFlakyTestDetector.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ void call(Map args = [:]) {
def testNameAdditionalPullRequests = new FetchTestPullRequests(metricsUrl, awsAccessKey, awsSecretKey, awsSessionToken, this).getTestPullRequests(failedTest).findAll { !allPullRequests.contains(it) }
def markdownTable = new CreateMarkDownTable(failedTest, testData, testNameAdditionalPullRequests).createMarkdownTable()
writeFile file: "${failedTest}.md", text: markdownTable
gradleCheckFlakyTestGitHubIssue(
/*gradleCheckFlakyTestGitHubIssue(
repoUrl: "https://github.com/opensearch-project/OpenSearch",
issueTitle: "[AUTOCUT] Gradle Check Flaky Test Report for ${failedTest}",
issueBodyFile: "${failedTest}.md",
label: args.issueLabels,
issueEdit: true
)
)*/
}
}
}
Expand Down

0 comments on commit b0fe29a

Please sign in to comment.