[sauceConnectLoader] we should await fs.rename & fs.chmod to avoid race conditions
Description
saucelabs npm package downloads sc binary via verifyAlreadyDownloaded async function before actually invoking it.
However, some of the file system operations are not properly awaited so if they are slow, spawn can happen before making sure sc binary is ready in the correct path.
Note that this type of bugs are easily detected by static checks if we use TypeScript + ESLint (no-floating-promises is part of recommended-type-checked)
Types of Changes
What types of changes does your code introduce? Keep the ones that apply:
Bug fix (non-breaking change which fixes an issue)
Tasks
List of tasks you will do to complete the PR
[ ] Add CHANGELOG
Review
List of tasks the reviewer must do to review the PR
[ ] Tests
[ ] Documentation
[ ] CHANGELOG
Deployment Notes
These should highlight any db migrations, feature toggles, etc.
[sauceConnectLoader] we should await fs.rename & fs.chmod to avoid race conditions
Description
saucelabs
npm package downloadssc
binary viaverifyAlreadyDownloaded
async function before actually invoking it. However, some of the file system operations are not properly awaited so if they are slow,spawn
can happen before making suresc
binary is ready in the correct path.Note that this type of bugs are easily detected by static checks if we use TypeScript + ESLint (no-floating-promises is part of
recommended-type-checked
)Types of Changes
What types of changes does your code introduce? Keep the ones that apply:
Tasks
List of tasks you will do to complete the PR
Review
List of tasks the reviewer must do to review the PR
Deployment Notes
These should highlight any db migrations, feature toggles, etc.
Nothing to care