From 10945b14cd3ad9e89bb8e337fb1c0c52bfa9c1ed Mon Sep 17 00:00:00 2001 From: "slav.babanin" Date: Thu, 16 Oct 2025 09:05:05 -0700 Subject: [PATCH 1/2] Fix data submission to performance monitoring API. --- .evergreen/.evg.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.evergreen/.evg.yml b/.evergreen/.evg.yml index e3bf87d49d..aff7418891 100644 --- a/.evergreen/.evg.yml +++ b/.evergreen/.evg.yml @@ -413,17 +413,17 @@ functions: fi parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}') - response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \ - "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" \ - -H 'accept: application/json' \ - -H 'Content-type: "application/json' \" - -d @src/results.json) + response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X POST \ + "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}" \ + -H "Accept: application/json" \ + -H "Content-Type: application/json" \ + --data-binary @src/results.json) http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}') response_body=$(echo "$response" | sed '/HTTP_STATUS/d') # We want to throw an error if the data was not successfully submitted - if [ "$http_status" -ne 200 ]; then + if [ "$http_status" != "200" ]; then echo "Error: Received HTTP status $http_status" echo "Response Body: $response_body" exit 1 From a851c7dd450d828243c7f16a65eb944f163073e4 Mon Sep 17 00:00:00 2001 From: "slav.babanin" Date: Thu, 16 Oct 2025 10:46:06 -0700 Subject: [PATCH 2/2] Fix variable expansion. --- .evergreen/.evg.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/.evg.yml b/.evergreen/.evg.yml index aff7418891..47663c015c 100644 --- a/.evergreen/.evg.yml +++ b/.evergreen/.evg.yml @@ -414,7 +414,7 @@ functions: parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}') response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X POST \ - "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}" \ + "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" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ --data-binary @src/results.json)