Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/publish-mcp-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
publish-mcp-registry:
name: Publish MCP Registry
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 20
env:
MCP_PUBLISHER_VERSION: v1.8.1
MCP_PUBLISHER_ASSET: mcp-publisher_linux_amd64.tar.gz
Expand Down Expand Up @@ -73,6 +73,27 @@ jobs:
./mcp-publisher --version
shell: bash

# The registry rejects a server whose npm version it cannot see yet, and npm lists a version it
# just accepted only after a few minutes. Wait for the version to appear, bounded.
- name: Wait for the npm release to be listed
env:
RELEASE_TAG: ${{ inputs.release_tag }}
run: |
set -euo pipefail
package="$(node -p "require('./package.json').name")"
version="${RELEASE_TAG#v}"
for _ in $(seq 1 40); do
if curl --fail --silent --show-error "https://registry.npmjs.org/${package}" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This poll loop is only bounded if each curl completes, but curl has no timeout by default: a hung registry response stalls the iteration indefinitely, and with up to 40 iterations the step can silently consume the whole 20-minute job budget instead of the intended ~10-minute poll. Add --max-time 30 so slow or dead connections fail the attempt and fall through to the sleep 15 retry.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/publish-mcp-registry.yml, line 86:

<comment>This poll loop is only bounded if each `curl` completes, but `curl` has no timeout by default: a hung registry response stalls the iteration indefinitely, and with up to 40 iterations the step can silently consume the whole 20-minute job budget instead of the intended ~10-minute poll. Add `--max-time 30` so slow or dead connections fail the attempt and fall through to the `sleep 15` retry.</comment>

<file context>
@@ -73,6 +73,27 @@ jobs:
+          package="$(node -p "require('./package.json').name")"
+          version="${RELEASE_TAG#v}"
+          for _ in $(seq 1 40); do
+            if curl --fail --silent --show-error "https://registry.npmjs.org/${package}" \
+              | node -e 'let s="";process.stdin.on("data",(c)=>(s+=c)).on("end",()=>process.exit(JSON.parse(s).versions?.[process.argv[1]]?0:1))' "$version"; then
+              echo "${package}@${version} is listed on npm."
</file context>
Suggested change
if curl --fail --silent --show-error "https://registry.npmjs.org/${package}" \
if curl --fail --silent --show-error --max-time 30 "https://registry.npmjs.org/${package}" \

| node -e 'let s="";process.stdin.on("data",(c)=>(s+=c)).on("end",()=>process.exit(JSON.parse(s).versions?.[process.argv[1]]?0:1))' "$version"; then
echo "${package}@${version} is listed on npm."
exit 0
fi
sleep 15
done
echo "::error::${package}@${version} is not listed on npm after 10 minutes."
exit 1
shell: bash

- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc

Expand Down
Loading