Giter Site home page Giter Site logo

Comments (6)

travi avatar travi commented on July 19, 2024

Seems similar to issues I've seen in the past: #54

from npm.

pvdlg avatar pvdlg commented on July 19, 2024

Duplicate of #658

Duplicate of #54

See npm/npm#19763

from npm.

pvdlg avatar pvdlg commented on July 19, 2024

I'm not sure whether it's appropriate for semantic-release to implement a workaround for this, but ideally it would continue with the release somehow.

semantic-release stop on error and doesn't attempt following publishing on purpose. This design choice has been made:

  • To prevent as much as possible to make releases that might have an issue (if a publish step fails it might indicate a problem with the content of the release)
  • To limit the number of release to rollback when a problem happens (if a release fails on a given platform, the user will most likely rollback the one that worked to avoid partial/inconsistent releases)
  • Because some publish step might depends on previous one

What would be the purpose of proceeding with the publish steps after one fails? What's the point of having a release done on one platform but not the other?

from npm.

travi avatar travi commented on July 19, 2024

I consider unpublishing a bad practice, so I try not to unpublish something that has been published (i actually wish npm would remove even the short unpublish window). My solution when this happens is to manually do the steps on GitHub rather than unpublish from npm. Not ideal since i haven't taken the time to figure out if there is a simpler way to handle this when it happens.

Still comes down to if the effort is worth it, but if it is, i think npm dist-tags ls has been reporting correctly after such a failure. That might be a reasonable sanity check in failure cases to see if the error was because of a real failure or a failure to report success. If it's just a failure to report success, it seems reasonable to me to still continue. This would at least reduce how often this actually impacts the result of what is published by semantic-release.

from npm.

pvdlg avatar pvdlg commented on July 19, 2024

My solution when this happens is to manually do the steps on GitHub rather than unpublish from npm.

That works in that case because the npm package is actually published. But in situation where there is a real failure, I don't think it's a good idea to proceed with other releases.

Still comes down to if the effort is worth it, but if it is, i think npm dist-tags ls has been reporting correctly after such a failure. That might be a reasonable sanity check in failure cases to see if the error was because of a real failure or a failure to report success. If it's just a failure to report success, it seems reasonable to me to still continue. This would at least reduce how often this actually impacts the result of what is published by semantic-release.

Yes, but I'm afraid that if we start doing these type of workaround we'll have to do many more for every other potential bugs in the npm CLI. My experience developing an integration with npm (for semantic-release) is that the CLI and the registry have a lot of instabilities and non-systematic issues. On the other hand the npm repo as more than 2000 issues opened, so those bugs might not be fixed anytime soon. I though about using yarn as a replacement but a lot of those issues seems related to the registry.

If the workaround you describe would be developed it should be in the npm CLI or the registry. I tried to see if I could open a PR for that but I got discouraged by the lack of readability and the difficulty to figure out what does what in the npm source code.

from npm.

pvdlg avatar pvdlg commented on July 19, 2024

Closing as it's an issue in npm and there is nothing we can do.
If we were to do something it would be to implement a mechanism to recover from a partial release. See semantic-release/semantic-release#896

from npm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.