Open jesstelford opened 7 years ago
i see how this could happen. sydney package metadata is served from aws sydney package events are triggered in us-west which is following changes in west.
i'll have to ponder how we go about solving this issue. the only helpful suggestion i have at the moment is adding a wait :fearful:
Alright, thanks @soldair! Any suggested wait time? Do you know how long approximately it takes to propagate around the world?
FYI, it just now (00:46UTC 16 February 2017) happened again (odd that it should happen twice so close together, but not in the last 4-5 months):
Command failed: /bin/sh -c npm i @domain-group/fe-pa-allhomes-agency-profile@2.3.3
npm ERR! Linux 4.4.39-34.54.amzn1.x86_64
npm ERR! argv "/root/.nvm/versions/node/v6.6.0/bin/node" "/root/.nvm/versions/node/v6.6.0/bin/npm" "i" "@domain-group/fe-pa-allhomes-agency-profile@2.3.3"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! No compatible version found: @domain-group/fe-pa-allhomes-agency-profile@2.3.3
npm ERR! Valid install targets:
npm ERR! 2.3.2, 2.3.1, 2.3.0, 2.2.1, 2.2.0, 2.1.1, 2.1.0, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.4.0, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.8, 1.2.7, 1.2.6, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.0, 0.1.0
For clarity, I should point out that the two packages are different. The first is ...agent..., and this is ...agency...
Happened again to us today:
Command failed: /bin/sh -c npm i @domain-group/fe-co-myd-widgets@1.3.1
npm ERR! Linux 4.4.39-34.54.amzn1.x86_64
npm ERR! argv "/root/.nvm/versions/node/v6.6.0/bin/node" "/root/.nvm/versions/node/v6.6.0/bin/npm" "i" "@domain-group/fe-co-myd-widgets@1.3.1"
npm ERR! node v6.6.0
npm ERR! npm v3.10.3
npm ERR! No compatible version found: @domain-group/fe-co-myd-widgets@1.3.1
npm ERR! Valid install targets:
npm ERR! 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.1, 1.0.0
:(
@soldair A quick update: This has happened a further 6 times since my last post above (all on different packages).
We haven't yet added a wait into our hook.
sadly the only reliable way right now is to poll the package endpoint in question (https://registry.npmjs.org/mypackage) until the modified time is >= to the modified time in the document or the version in question exists. this could be wrapped in a module =/
long term we need the delivery of webhooks to a region be based on the progress of the replicatipon feed for the region.
@jesstelford we have a plan to fix this but its not complete yet. :(
i made this module. https://www.npmjs.com/package/wait-for-package-replication
if you run this in the hook receiver before triggering your work it'll make sure to block till things have made it to your region.
Oh wow, that is excellent! Thanks @soldair - we're definitely going to make use of this 🎉
This just happened (02:30UTC, Wednesday, 15 February 2017)
npm publish
, which succeeded.(unfortuantely the box is ephemeral, so I don't have the
.log
file to share)Retrying the installation just moments later worked successfully.
My guess is the hook was fired before the package was replicated to all data stores globally (our server is located in the Sydney, Australia AWS region), so when we tried to install, it wasn't quite ready yet.
Update: See https://github.com/npm/registry/issues/126#issuecomment-293431336 for a workaround by @soldair