Shopify / ci-queue

Distribute tests over many workers using a queue
MIT License
170 stars 27 forks source link

Automatically detect retried jobs #69

Closed casperisfine closed 6 months ago

casperisfine commented 6 years ago

Currently some of our projects use the following wrapper script:

command = %w(bundle exec minitest-queue)
command << (ENV['BUILDKITE_RETRY_COUNT'].to_i > 0 ? 'retry' : 'run')

This is pretty much always the behavior you want, so minitest-queue and rspec-queue should behave like this by default if they detect the job was retried.

I need to check CircleCI & Travis-ci docs to know if they have a similar env var.

cc @jmreid @wvanbergen

wvanbergen commented 6 years ago

We got a report of somebody running into this issue with the RSpec runner as well.

mrsimo commented 6 years ago

There doesn't seem to be one in CircleCI. Their docs, and it matches what I see in our builds.

Any ideas on how to achieve the same?

casperisfine commented 6 years ago

I'm not sure it can apply to Circle anyway, as IIRC you can't retry individual jobs in Circle, you have to retry the full build.

mrsimo commented 6 years ago

Oh, right. It's using CIRCLE_BUILD_URL. Yeah, that'll definitely be different per build, even retries.