-
Notifications
You must be signed in to change notification settings - Fork 24
Fix Docs MCP deployment reliability #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Docs MCP Production Health | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "*/15 * * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: docs-mcp-production-health | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| mcp-handshake: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 3 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Initialize MCP and list tools | ||
| run: node docs-mcp/smoke-test.mjs https://docs-mcp.genlayer.com/sse | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Docs MCP operations | ||
|
|
||
| The Docs MCP service has three separately owned parts: | ||
|
|
||
| - this repository builds and publishes the server image; | ||
| - `genlayerlabs/devexp-apps-workload` deploys the image to Kubernetes through | ||
| ArgoCD; | ||
| - `genlayerlabs/skills` exposes the public SSE endpoint from the | ||
| `genlayer-dev` plugin. | ||
|
|
||
| Publishing an image is not a deployment. Production must reference an immutable | ||
| `sha-<commit>` image tag (or digest) in the workload repository. A deployment is | ||
| complete only after the new Kubernetes rollout succeeds and | ||
| `smoke-test.mjs` completes an MCP `initialize` and `tools/list` exchange against | ||
| the public endpoint. | ||
|
|
||
| ## Health check | ||
|
|
||
| Run the protocol-level canary: | ||
|
|
||
| ```bash | ||
| node docs-mcp/smoke-test.mjs https://docs-mcp.genlayer.com/sse | ||
| ``` | ||
|
|
||
| An HTTP-only `/healthz` check is insufficient. The production nginx sidecar can | ||
| answer that route even when the MCP container is unavailable. | ||
|
|
||
| ## Incident triage | ||
|
|
||
| Check both the pod and the MCP container before restarting anything: | ||
|
|
||
| ```bash | ||
| kubectl get pods -n studio-prd -l app=docs-mcp-server | ||
| kubectl describe pod -n studio-prd -l app=docs-mcp-server | ||
| kubectl logs -n studio-prd -l app=docs-mcp-server -c docs-mcp-server --tail=200 | ||
| kubectl logs -n studio-prd -l app=docs-mcp-server -c docs-mcp-server \ | ||
| --previous --tail=200 | ||
| kubectl get events -n studio-prd --sort-by=.lastTimestamp | ||
| ``` | ||
|
|
||
| Inspect PVC capacity and index size when logs mention SQLite, disk, migration, | ||
| or verification errors. `documents.db` is derived data; the entrypoint removes | ||
| an unusable database and rebuilds it from the configured docs sources. | ||
|
|
||
| ## Required deployment guardrails | ||
|
|
||
| The workload repository should: | ||
|
|
||
| 1. pin an immutable image tag or digest; | ||
| 2. use a rolling deployment with at least two serving replicas; | ||
| 3. move indexing into a separate Job that writes a new index before rollout; | ||
| 4. make readiness and ingress health depend on the MCP process, not nginx; | ||
| 5. wait for rollout completion and run the public protocol canary; | ||
| 6. roll back automatically when the canary fails; | ||
| 7. alert the owning channel when the scheduled canary fails. | ||
|
|
||
| Do not restore the removed `POST /web/jobs/scrape` workflow call. That route is | ||
| not exposed by the pinned `docs-mcp-server mcp` runtime. Refresh the index with a | ||
| dedicated indexing Job instead. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Alert when the scheduled canary fails.
This only creates a failed Actions run; it does not notify an owning channel. Add the repository’s failure-alert integration so outages are actionable, as required by
docs-mcp/OPERATIONS.mdlines 47-55.🤖 Prompt for AI Agents