Skip to content

Removed packages list is stale #34

Closed

Description

Types-publisher is still trying to remove @types/google-cloud__storage even though it's already gone.

Currently this hangs the server instead of crashing it too, because of the setInterval I used to try again. But when the interval fires, updateOneAtATime refuses to run again because the closed-over boolean doesn't get reset with the callback throws.

Activity

  1. sandersn commented on Feb 1, 2019

    @sandersn
    MemberAuthor

    Actually, it looks like the problem is that

    1. @types/google-cloud__storage is still around, just doesn't come up in npmjs's search.
    2. But deleting it doesn't work? Maybe the syntax is just wrong.
  2. sandersn commented on Feb 1, 2019

    @sandersn
    MemberAuthor

    Looks like there is a workaround, at least:

    $ node bin/publish-packages.js --deprecate google-cloud__storage

    I don't know why this succeeds when the normal run does not; the comments around the --deprecate code are not encouraging.

  3. sandersn commented on Feb 9, 2019

    @sandersn
    MemberAuthor

    Later: --deprecate succeeds because the way that this bug fails and microsoft/types-publisher#573 fails is that the publish of the to-be-deprecated version succeeds, but not the deprecation. There are two steps, and --deprecate only does the deprecate, not the publish.

    Maybe this happens when the server crashes halfway through deprecation?

  4. sandersn commented on Feb 9, 2019

    @sandersn
    MemberAuthor

    Also, --deprecate doesn't update the latest tag.

  5. sandersn commented on Feb 11, 2019

    @sandersn
    MemberAuthor

    After further investigation, it looks like the failure of this bug and microsoft/types-publisher#573 was slightly different.

    This bug

    For google-cloud__storage, the deprecation process was supposed to

    1. Publish @types/google-cloud__storage@2.3.0.
    2. Mark 2.3.0 as deprecated.
    3. Move the latest tag to 2.3.0.

    On the first attempt, (1) successfully happened, but (2) and (3) did not. On subsequent attempts, types-publish thought none of the steps had happened, and crashed when re-attempting (1) because npm complained that version 2.3.0 was already present.

    The workaround was to run node bin/publish-package.js --deprecate google-cloud__storage, followed by npm deprecate @types/google-cloud__storage. publish-package.js --deprecate only runs step (2) above.

    fastify-static

    For fastify-static, the deprecation process was supposed to

    1. Publish @types/fastify-static@2.2.0.
    2. Mark 2.2.0 as deprecated.
    3. Move the latest tag to 2.2.0.

    On the first attempt, (1) sort of happened, but (2) and (3) did not. On subsequent attempts, types-publish thought none of the steps had happened, and crashed when re-attempting (1) because npm complained that version 2.2.0 was already present. However, 2.20 was not present -- but the "last updated" field indicated 2.2.0.

    The workaround was to bump fastify-static in notNeededPackages.json to 2.2.1, which restarted the process.

    Next steps

    1. Figure out why google-cloud__storage failed after publishing.
    2. Figure out why fastify-static failed to correctly publish.
  6. sandersn commented on Jun 9, 2020

    @sandersn
    MemberAuthor

    Pretty sure this is fixed by the try-again logic I added to deprecation.

  7. added 3 commits that reference this issue on Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions