karma-runner / karma-sauce-launcher

A Karma plugin. Launch any browser on SauceLabs!
MIT License
199 stars 103 forks source link

Retry start Sauce Connect #219

Closed christian-bromann closed 3 years ago

christian-bromann commented 3 years ago

Someone reported an issue of Sauce Connect launcher failing with ENOENT which is normally impossible because we download Sauce Connect before we run it. It seems that there is a race condition where checking if the Sauce Connect binary was downloaded fails when looking for the version. The execution happens as follows:

  1. check if the binary was downloaded
    1. if no -> download
    2. if yes continue
  2. check if version is the one that has been downloaded
    1. if no -> download expected version
    2. if yes finish

The race condition seem to happen when the check if the binary exists was successful but then the consecutive version check fails if in between someone cleaned the binary which can happen in an CI/CD environment where dependencies are shared.

This patch introduces a retry to see if this race condition can be caught.

karmarunnerbot commented 3 years ago

:tada: This PR is included in version 4.1.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: