fix(monitor): 修复取件死信无法重排与列表 NULL 标志导致的 500
- platform/postgres: listTestPublicationsSQL 的 can_start/can_retry 在 LEFT JOIN
内容对象为空时算出 NULL,Go 侧 bool 扫描失败使整个列表接口 500,前端三个 lane
全空(表现为“待入库 0 / 全部任务 0”)。改为 COALESCE(..., false)。
- 新增 POST /api/v1/job-failures/{id}/requeue:取件任务的幂等键绑在版本上,
失败那次已占住它,重新标注同一文件不会再入队;现在按新轮次 (…:r<n>) 重排、
复位意图取件状态并把死信标记为 requeued(幂等信封 + 审计字段)。
- web: 死信区对 artifact.fetch 显示「重新入队」;系统设置新增「知识库绑定」分区,
挂上一直没被渲染的 RoutingBindingsSection,导入目标库可在页面上切换。
- 测试:真实 PostgreSQL 集成测试(NULL 折叠 + 重排轮次/幂等/拒绝)、前端死信按钮
与设置分区渲染测试。
This commit is contained in:
@@ -1675,6 +1675,60 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/job-failures/{id}/requeue": {
|
||||
"post": {
|
||||
"operationId": "requeueJobFailure",
|
||||
"summary": "重排一条终端失败的“源头取件”死信",
|
||||
"description": "取件任务的幂等键绑在来源版本上,失败那次已占住它,所以重新标注同一文件不会再入队。本接口按新轮次重新入队并复位意图取件状态,同时把死信标记为 requeued。仅限 artifact.fetch 类型且仍为 open 的记录。",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/IdempotencyKey"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"reason"
|
||||
],
|
||||
"properties": {
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 500
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "已重新入队;replayed=true 表示幂等重放"
|
||||
},
|
||||
"400": {
|
||||
"description": "请求无效或缺少 Idempotency-Key"
|
||||
},
|
||||
"409": {
|
||||
"description": "该失败记录不可重排,或幂等键与不同请求冲突"
|
||||
},
|
||||
"500": {
|
||||
"description": "服务端错误"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/job-failures": {
|
||||
"get": {
|
||||
"summary": "分页列出解析死信(DLQ)投影",
|
||||
|
||||
Reference in New Issue
Block a user