Open
Conversation
- bootstrap.py / vikingbot gateway: abort with a clear message when 18790 is already held, before fork / before uvicorn startup. Avoids the silent fail-open caused by the existing 2s subprocess poll firing before uvicorn's bind attempt (~5s). - vikingbot/__init__.py: read __version__ from openviking package metadata instead of a hardcoded "0.1.3" that lied in /health. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
Collaborator
|
api 测试流水线有报错 |
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.
修两个排障时被坑的点
1.
--with-bot端口被占时不报错bootstrap.py启动 vikingbot 子进程后只sleep(2)看进程死没死。但 vikingbot 要 ~5s 才走到 uvicorn bind,2s 时还在 import,进程当然是活的 → openviking-server 以为成功了,HTTP 代理转发到 18790,那里旧的 vikingbot 还在响应。从外面看一切正常,实际升级根本没生效。修复:fork 前用
socket.connect试一下 18790,被占就直接 exit 1 + 打lsof提示。两层都加(bootstrap.py和vikingbot gateway)。2.
/health永远返回version: "0.1.3"vikingbot/__init__.py里写死的。改成从importlib.metadata.version("openviking")动态读。测试
lsof提示/health正确反映已安装版本🤖 Generated with Claude Code