summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Duhem <yves.duhem@mongodb.com>2018-06-01 17:40:24 -0400
committerYves Duhem <yves.duhem@mongodb.com>2018-07-12 15:05:49 -0400
commita7bcf9614f4363f5212e2f7b5b5518d37e3667d4 (patch)
tree85bd4b28b8a4a0815315211462d7e82e8ee52118
parent3bfa9c492c4f906d6ea886f2225ced1f8e65951d (diff)
downloadmongo-a7bcf9614f4363f5212e2f7b5b5518d37e3667d4.tar.gz
SERVER-34793 Add call to BF Suggestion server on task failure
(cherry picked from commit 2a86ca0c461b64144e274ec00dd36d3c860e2141)
-rw-r--r--etc/evergreen.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 5992bb0f57b..4aeb73addd6 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -402,6 +402,30 @@ functions:
https_validate_certificates = False
EOF
+ "call BF Suggestion service":
+ command: shell.exec
+ params:
+ working_dir: src
+ silent: true
+ script: |
+ report_file="report.json"
+ # Check if the report file exists and has failures.
+ if [ -f $report_file ] && grep -Eq "\"failures\": [1-9]" $report_file; then
+ # Calling the BF Suggestion server endpoint to start feature extraction.
+ payload="{\"task_id\": \"${task_id}\", \"execution\": ${execution}}"
+ echo "Sending task info to the BF suggestion service"
+ # The --user option is passed through stdin to avoid showing in process list.
+ user_option="--user ${bfsuggestion_user}:${bfsuggestion_password}"
+ curl --header "Content-Type: application/json" \
+ --data "$payload" \
+ --max-time 10 \
+ --silent \
+ --show-error \
+ --config - \
+ https://bfsuggestion.corp.mongodb.com/tasks <<< $user_option
+ echo "Request to BF Suggestion service status: $?"
+ fi
+
"upload debugsymbols" : &upload_debugsymbols
command: s3.put
params:
@@ -979,6 +1003,7 @@ post:
ignore_artifacts_for_spawn: false
files:
- src/archive.json
+ - func: "call BF Suggestion service"
- func: "kill processes"
# Print out any Out of Memory killed process messages.
- command: shell.exec