Repository navigation
fix(targets): Wait for npm before publishing to the MCP Registry - #963
Merged
Merged
Conversation
The mcp-registry target runs right after the npm target, and the registry rejects a publish when npm does not serve the new package version yet. getsentry/toolkit 0.48.0 failed this way one second after npm accepted @sentry/mcp-server@0.48.0. Before authenticating, poll npm for each npm package version at the same URL the registry validates, for up to about five minutes. Retry 429 responses as well. The registry still does the mcpName check. Refs getsentry/publish#10254 Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Contributor
|
BYK
approved these changes
Nov 5, 2026
8 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
mcp-registrytarget runs right afternpm, and the MCP Registry rejects a publish when npm doesn't serve the new package version yet. That's what broke getsentry/toolkit 0.48.0 (publish#10254, run):npmaccepted@sentry/mcp-server@0.48.0at 20:08:20, and the registry returnedNPM package '@sentry/mcp-server' exists, but version '0.48.0' was not found (status: 404)at 20:08:21.#945 removed the npm wait in a1b55d5 so the registry could do the check alone. This adds the wait back:
https://registry.npmjs.org/<name>/<version>for eachnpmpackage in the manifest. This is the same URL the registry fetches innpm.go.pollJsonalso retries 429 responses now, for npm and for the listing poll.mcpNamecheck. The registry already does it and returns a clear error.Docs in
targets/mcp-registry.mdare updated to match.Tests: I added
mcpRegistry.test.tscases for waiting through 404, 429, and 503 responses, giving up after the limit without publishing, and skipping non-npm packages.pnpm lintpasses. Inpnpm test, the only failures are the same 24prepare-dry-run.e2etests that fail onmasterin this sandbox.Co-Authored-By: BYK burak.kaya@sentry.io
via @BYK.
--
View Session in Sentry