feat(acceptance): 增加生产同构媒体压力验收模式
引入动态流量门禁、隔离验收身份与协议级 Gemini/Volces 模拟器,覆盖双站点 API、Worker、PostgreSQL、River、账务、回调和媒体物化链路。 新增 P24/P28/P32 容量阶梯、Worker 强杀恢复、真实小流量 canary、CAS 放量和失败保持 validation 的生产编排;Worker 执行槽、连接池、媒体并发和双站点副本数改为环境配置。 验证:Go 全量测试、真实 PostgreSQL 迁移集成测试、迁移安全检查、OpenAPI 生成、ShellCheck、Kustomize、gofmt 和 git diff --check。
This commit is contained in:
@@ -2575,6 +2575,302 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "创建生产同构验收 Run",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "验收 Run",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.CreateAcceptanceRunInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.AcceptanceRun"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "获取生产同构验收 Run",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.AcceptanceRun"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}/abort": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "人工 CAS 中止验收并切回 live",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "线上 release 与 digest CAS",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.PromoteAcceptanceRunInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.GatewayTrafficMode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}/activate": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "切换到 validation 并激活 Run",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.GatewayTrafficMode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}/finish": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "记录验收门禁结果",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "门禁结果",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.FinishAcceptanceRunInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.AcceptanceRun"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}/promote": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "通过 CAS 切回 live",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "线上 release 与 digest CAS",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.PromoteAcceptanceRunInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.GatewayTrafficMode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/runs/{runID}/retry": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "在 validation 关闭正式流量的状态下重试失败 Run",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "验收 Run ID",
|
||||
"name": "runID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.AcceptanceRun"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/acceptance/traffic-mode": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"acceptance"
|
||||
],
|
||||
"summary": "获取 Gateway 流量模式",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/store.GatewayTrafficMode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/system/client-customization/settings": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -12618,6 +12914,67 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.AcceptanceRun": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiImageDigest": {
|
||||
"type": "string"
|
||||
},
|
||||
"apiKeyId": {
|
||||
"type": "string"
|
||||
},
|
||||
"callbackUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"capacityProfile": {
|
||||
"type": "string"
|
||||
},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"emulatorBaseUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"failureReason": {
|
||||
"type": "string"
|
||||
},
|
||||
"finishedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"promotedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"releaseSha": {
|
||||
"type": "string"
|
||||
},
|
||||
"report": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"startedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
},
|
||||
"workerImageDigest": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.AccessRule": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -12758,6 +13115,9 @@
|
||||
"store.AdminGatewayTask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acceptanceRunId": {
|
||||
"type": "string"
|
||||
},
|
||||
"adminContext": {
|
||||
"$ref": "#/definitions/store.AdminTaskContext"
|
||||
},
|
||||
@@ -13461,6 +13821,42 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.CreateAcceptanceRunInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiImageDigest": {
|
||||
"type": "string"
|
||||
},
|
||||
"apiKeyId": {
|
||||
"type": "string"
|
||||
},
|
||||
"callbackUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"capacityProfile": {
|
||||
"type": "string"
|
||||
},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"emulatorBaseUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"releaseSha": {
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
},
|
||||
"workerImageDigest": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.CreatePlatformInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -13753,9 +14149,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.FinishAcceptanceRunInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"failureReason": {
|
||||
"type": "string"
|
||||
},
|
||||
"passed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"report": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.GatewayTask": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acceptanceRunId": {
|
||||
"type": "string"
|
||||
},
|
||||
"apiKeyId": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -14061,6 +14475,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.GatewayTrafficMode": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiImageDigest": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"type": "string"
|
||||
},
|
||||
"releaseSha": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"runId": {
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"workerImageDigest": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.GatewayUser": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -15058,6 +15498,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.PromoteAcceptanceRunInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"apiImageDigest": {
|
||||
"type": "string"
|
||||
},
|
||||
"releaseSha": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"workerImageDigest": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"store.RateLimitMetricStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user