mongodb-labs / drivers-evergreen-tools

Scripts for MongoDB drivers to bootstrap their Evergreen configuration file - This Repository is NOT a supported MongoDB product
10 stars 64 forks source link

PYTHON-4734 Make node download more robust #490

Closed blink1073 closed 1 month ago

blink1073 commented 1 month ago

Rehash of #488, allowing the command to fail:

Tested with:

set -e
. ./retry-with-backoff.sh
retry_with_backoff blargh
retry_with_backoff: running 'blargh' - attempt n. 1 ...
./retry-with-backoff.sh: line 24: blargh: command not found
retry_with_backoff: attempt failed! Retrying in 1..
retry_with_backoff: running 'blargh' - attempt n. 2 ...
./retry-with-backoff.sh: line 24: blargh: command not found
retry_with_backoff: attempt failed! Retrying in 2..
retry_with_backoff: running 'blargh' - attempt n. 3 ...
./retry-with-backoff.sh: line 24: blargh: command not found
retry_with_backoff: attempt failed! Retrying in 4..
retry_with_backoff: running 'blargh' - attempt n. 4 ...
./retry-with-backoff.sh: line 24: blargh: command not found
retry_with_backoff: attempt failed! Retrying in 8..
retry_with_backoff: running 'blargh' - attempt n. 5 ...
./retry-with-backoff.sh: line 24: blargh: command not found
retry_with_backoff: attempt failed! Retrying in 16..
retry_with_backoff: All attempts failed
ShaneHarvey commented 1 month ago

This is now causing GCP KMS to fail with Bad substitution:

 [2024/09/11 08:25:00.553] Running start-mongodb.sh on GCE instance (instancename-10248) ... begin
 [2024/09/11 08:25:23.250] Cloning into 'drivers-evergreen-tools'...
 [2024/09/11 08:25:23.250] /home/sa_113233652026321183788/drivers-evergreen-tools/.evergreen/run-orchestration.sh: 6: /home/sa_113233652026321183788/drivers-evergreen-tools/.evergreen/download-mongodb.sh: Bad substitution
 [2024/09/11 08:25:23.392] Starting MongoDB server ... begin
 [2024/09/11 08:25:23.392] Command 'subprocess.exec' (step 5 of 5) in block 'setup_group' failed: process encountered problem: exit code 2.

https://spruce.mongodb.com/task/mongo_python_driver_testgcpkms_variant_testgcpkms_task_63d957c2137cec66821d4d1669ff7a24f4c4f6f0_24_09_11_15_22_22/logs?execution=0

CC: @W-A-James

blink1073 commented 1 month ago

I see the mistake, PR coming