shopify-packer icon indicating copy to clipboard operation
shopify-packer copied to clipboard

'Deploy already in progress' breaking watch task [BUG]

Open HarryFrancis opened this issue 3 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is. Whilst running the packer watch command and saving two files in quick succession, the library throws a 'Deploy already in progress' error.

This causes the watch command to stop. Ideally it should just carry on running, and queue another deployment with the new file?

To Reproduce Steps to reproduce the behavior:

  1. npm run watch
  2. Change a file
  3. Save
  4. Change again
  5. Save
  6. See error

(Note: Steps 2-5 need to happen quite quickly, so that the second save happens before the first finishes deploying)

Expected behavior I'd expect the second file saved to get queued for deployment after the first.

Screenshots

ezgif com-gif-maker

System (please complete the following information):

  • OS: Mac OSX 10
  • Node Version: 15.4.0
  • NPM Version: 7.0.15
  • Browser: Chrome

Packer (please complete the following information):

  • Version: 1.3.4

Theme (please complete the following information):

HarryFrancis avatar Apr 16 '21 15:04 HarryFrancis

Wasn't sure where to put this, but here is the terminal output when running he recreation steps:

Watching for changes...
✔ Compiling...
✔  Compiled successfully in 0.067s!

↑  Uploading to Shopify...

[development] 0|1 [------------------------------------------------------------------------------]  0 %
✔ Compiling...
✔  Compiled successfully in 0.071s!
/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:24
    return Promise.reject(new Error('Deploy already in progress.'));
                          ^

Error: Deploy already in progress.
    at maybeDeploy (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:24:27)
    at sync (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/sync.js:199:12)
    at Client.sync (/Users/harryfrancis/.nvm/versions/node/v15.0.1/lib/node_modules/@hayes0724/shopify-packer/src/server/client.js:32:13)
[development] 0|1 [------------------------------------------------------------------------------]  0 %
npm ERR! code 1
npm ERR! path /Users/harryfrancis/Documents/T&M/sauce/tm09-sauce-v3
npm ERR! command failed
npm ERR! command sh -c packer start --skipFirstDeploy

npm ERR! A complete log of this run can be found in:
[development] 1|1 [==============================================================================]  100 %
[development] 1|1 [==============================================================================]  100 %
[development] 1 files, Updated: 1

HarryFrancis avatar Apr 16 '21 15:04 HarryFrancis