Job-triggered retries
j
j.green@jeremygreen.me.uk
I'd like job-level retries that are triggered by the job scripts themselves. E.g. if they detect that an android emulator or Xcode has failed.
E.g. by scraping specific error messages from the tools' output, or some kind of end-of-job ping for emulators.
Retrying for everything (https://circleci.com/changelog/automatic-retry-of-workflows-released/) masks occasional fails (something tests are specifically supposed to find for you). Retrying for specific things doesn't have this problem.
A job could trigger a retry be creating a file whose path is specified by a circleci-provided env. var. The reason could (optionally) be the file's content.
j
j.green@jeremygreen.me.uk
https://circleci.canny.io/api-feature-requests/p/allow-re-run-failed-tests-to-be-triggered-via-api is similar, but I wouldn't want to have to use an http API for this. Just like I wouldn't want to do that to indicate a job has failed.
j
j.green@jeremygreen.me.uk
Step-level equivalent would be less useful and more complex, so my suggestion is just for job.
Can implement as a loop in the step (until step timeouts are implemented). You start with fresh workspace/files if re-run a job, but don't if re-run a step.
j
j.green@jeremygreen.me.uk
https://circleci.canny.io/cloud-feature-requests/p/support-automatic-retry-of-failed-builds doesn't seem to mention this aspect of retries.