The root cause is that when setting retries and downloading artifacts simultaneously, the code determines whether to proceed with the download by checking AllAttempts and whether it's the last attempt (attempts < total retries).
However, if the job doesn’t run out of retries (e.g., if the first job has passed or the job passes threshold before hitting the retry limit), the number of attempts is smaller than the total retries, leading to the download being skipped.
To fix this issue, I updated the download function as we've known if the job is the last attempt.
Description
The root cause is that when setting retries and downloading artifacts simultaneously, the code determines whether to proceed with the download by checking
AllAttempts
and whether it's the last attempt (attempts < total retries
).However, if the job doesn’t run out of retries (e.g., if the first job has passed or the job passes threshold before hitting the retry limit), the number of attempts is smaller than the total retries, leading to the download being skipped.
To fix this issue, I updated the download function as we've known if the job is the last attempt.
This solves https://github.com/saucelabs/saucectl/issues/939 and https://github.com/saucelabs/saucectl/issues/938