Skip to content

Commit 459836c

Browse files
authored
Fix data submission to performance monitoring API. (#1828)
JAVA-5994
1 parent eb670e3 commit 459836c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.evergreen/.evg.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,17 +424,17 @@ functions:
424424
fi
425425
426426
parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
427-
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
428-
"https://performance-monitoring-api.corp.mongodb.com/raw_perf_results/cedar_report?project=${project_id}&version=${version_id}&variant=${build_variant}&order=$parsed_order_id&task_name=${task_name}&task_id=${task_id}&execution=${execution}&mainline=$is_mainline" \
429-
-H 'accept: application/json' \
430-
-H 'Content-type: "application/json' \"
431-
-d @src/results.json)
427+
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X POST \
428+
"https://performance-monitoring-api.corp.mongodb.com/raw_perf_results/cedar_report?project=${project_id}&version=${version_id}&variant=${build_variant}&order=$parsed_order_id&task_name=${task_name}&task_id=${task_id}&execution=${execution}&mainline=$is_mainline" \
429+
-H "Accept: application/json" \
430+
-H "Content-Type: application/json" \
431+
--data-binary @src/results.json)
432432
433433
http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
434434
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
435435
436436
# We want to throw an error if the data was not successfully submitted
437-
if [ "$http_status" -ne 200 ]; then
437+
if [ "$http_status" != "200" ]; then
438438
echo "Error: Received HTTP status $http_status"
439439
echo "Response Body: $response_body"
440440
exit 1

0 commit comments

Comments
 (0)