Conversation
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.
解决的问题与行为变化
/readyz原来固定使用 1 秒检查 PostgreSQL 和 Redis。远程依赖正常但检查超过 1 秒时,运维只能修改代码才能调整应用预算;单独增大 kubelet 的timeoutSeconds无效。新增
server.readiness_timeout_seconds/SERVER_READINESS_TIMEOUT_SECONDS,省略或0保持 1 秒,显式值允许1..60秒。HTTP 等待和共享依赖检查使用相同预算;内部调用者也有等待上限,更短的调用者 deadline 仍优先。依赖错误继续返回 503,响应不暴露内部错误;并发探针继续共用同一次检查,取消一个调用者不会中止其他调用者的检查。关联记录与来源
Refs #279。仅补齐 readiness 预算配置,不关闭该 Issue:线上 scheduler full rebuild 超时、outbox lag 和远端依赖延迟原因仍需排查。本 PR 未引入其他仓库提交。
复现与验收
production的bc83ff9c367883e5b7d0140e6bb42e2e7cc5239c;本机 macOS arm64、Go 1.27.0。TestProvideLifecycleSlowDependency使用 sqlmock 模拟 1.2 秒 PostgreSQL Ping,并连接本地 miniredis,通过真实 provider 与 HTTP wrapper 验证:默认预算返回 503,配置 2 秒返回 200。实际验证
git diff --check、修改的 Go 文件经 gofmtbackend/:go test -race -tags=unit ./internal/config ./internal/server ./internal/serverlessbackend/:go generate ./cmd/serverbackend/:CGO_ENABLED=0 GOMAXPROCS=2 go build -p 1 -trimpath -o /tmp/sub2api-readiness-server ./cmd/serverbf6856d6abf6856d6aTestManagedProcessGetsOnlyWorkerEnvironmentAndStops读到preparing而非running;该包与基线完全一致,已重跑失败 job。readiness 所在包通过。同 head 的 push CI 全绿不替代这条失败记录;该用例在本机 macOS 会跳过兼容性与运行影响
readinessProbe.timeoutSeconds: 5。Compose 需要显式传入环境变量。文档与用户可见变化
更新
deploy/config.example.yaml和deploy/kubernetes/README.md,补充环境变量、Kubernetes 配套示例及适用边界。无 UI 改动。Agent 使用声明
提交前自查