boltpkg / bolt

⚡️ Super-powered JavaScript project management
MIT License
2.35k stars 82 forks source link

Bolt publish fails because npm can give wrong information quite often #205

Open lukebatchelor opened 5 years ago

lukebatchelor commented 5 years ago

Through no fault of this project, bolt publish can still fail when npm has data replication issues.

We are now seeing this issue tens of times a day in the atlaskit-mk-2 repo.

Scenario

Suggested fixes

  1. We could look for another source of truth for which versions have been deployed. Unfortunately:

🚫So this likely wouldn't solve the problem (unless there is a better source of truth)

  1. We could look at the error messages that come back from npm and ignore them if they are 403's with the message saying you cant publish over an existing version
  1. We could change the way publish works and take an explicit list of packages to publish and ignore the others

    • 🚫 This would remove some of our auto-recoverability which would need to be solved another way
    • 🚫 Would be a breaking change to current

Personally, I'd lean towards option 2. Happy to put it behind a flag if necessary though.

Thoughts?

lukebatchelor commented 5 years ago

CC @jamiebuilds