commit | 73d301aa8d23fa8ea0404740b16c070f0c387663 | [log] [tgz] |
---|---|---|
author | Leonardo Sandoval <leonardo.sandoval@linaro.org> | Fri Feb 12 13:42:55 2021 -0600 |
committer | Leonardo Sandoval <leonardo.sandoval@linaro.org> | Tue Feb 16 09:07:04 2021 -0600 |
tree | bdac765f992e4190e4e106cc5744422e39e95c0f | |
parent | a8078d68f36c9f0ece15e13b3c534b273cb03473 [diff] |
squad.sh: resilient LAVA job ID retrieval Under heavy loads in the LAVA lab [1], job ID retrieval through squad may yield invalid job id numbers as seen in [2] and below 12:37:03 ++ curl --retry 4 'https://qa-reports.linaro.org/api/testjobs/4020286/?fields=job_id' 12:37:05 % Total % Received % Xferd Average Speed Time Time Time Current 12:37:05 Dload Upload Total Spent Left Speed 12:37:05 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 15 100 15 0 0 40 0 --:--:-- --:--:-- --:--:-- 40 100 15 100 15 0 0 40 0 --:--:-- --:--:-- --:--:-- 40 12:37:05 + LAVAJOB_ID='{"job_id":null}' This commit introduce a simple loop & sleep sequence, breaking the loop either if ID is a valid number or max-tries. [1] https://tf.validation.linaro.org/ [2] https://ci.staging.trustedfirmware.org/job/lsandov1-tf-a-builder/21995/console Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org> Change-Id: I93c9e81a150f87c850f35dbca547482f906a3829