Repository navigation
fix(sdk,cli): surface tunnel status reporting gaps (#56) - #58
Open
grapedev-bot wants to merge 1 commit into
Open
grapedev-bot wants to merge 1 commit into
grapedev-bot wants to merge 1 commit into
Conversation
- add TunnelStatus.reportedAt so the SDK keeps the statistics report time - devbridge show warns when status is missing or reportedAt is stale (>120s) and renders '-'- instead of a misleading 0 - cover status present/null/missing reportedAt/stale reportedAt in tests - document status/reportedAt semantics in en/zh API and tunnel guides
Collaborator
Author
|
[QA Agent] 审查报告 审查范围
配置检查
代码审查结论:✅ 通过(无阻断问题) 已核对实现与 Spec:
Optional(非阻断): 工作流审查(Agent Work Loop)结论:✅ 健康(存在可选改进项)
安全扫描结论:✅ 安全 — 未发现硬编码密钥、敏感信息或外部输入不安全处理。 合并检查
|
This branch has not been deployed
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.
概述
修复新建隧道不返回
status时的客户端可观测性问题(Issue #56)。本 PR 为客户端侧可独立交付部分,服务端根因单列由后端承接。改动
go-sdk/models.go:TunnelStatus增加ReportedAt int64(json:"reportedAt"),字段缺失时兼容为0。cli/cmd/tunnel.go:devbridge show在status缺失时以-展示计数/流量并提示“统计状态未上报”;reportedAt缺失或距今超过 120s 时提示“统计上报时间缺失/统计状态已过期”,不再静默显示误导性 0。正常时额外展示统计上报时间。go-sdk/tunnel_test.go覆盖 status 正常 / null / reportedAt 缺失;cli/cmd/tunnel_test.go覆盖 status nil / reportedAt 缺失 / 新鲜 / 120s 边界 / 过期。docs/reference/api.md、docs/zh/reference/api.md、docs/guide/tunnels.md、docs/zh/guide/tunnels.md同步 status/reportedAt 语义及缺失/过期处理。服务端承接项(外部,需后端排期)
relay-controller 需修复新建隧道创建时的注册与统计采集器订阅分片/注册表一致性:
GET /v1/tunnels/{id}与GET /open-api-inner/v1/relay-controller/tunnels/{id}均返回status(含reportedAt)。hostConnectionCount=1,reportedAt≤60s。验证
go test ./...、go vet ./...(go-sdk、cli 均通过)gofmt无差异关联
Closes #56