docs: update dev-log - pipeline.go split
This commit is contained in:
1 parent
8f1d5e2107
commit
9af0890bc6
1 file changed
+20
@@ -976,3 +976,23 @@ cd ~/devops/aiops
|
|||||||
- **下一步建议**:
|
- **下一步建议**:
|
||||||
- 后端 pipeline.go(541行)、billing.go(476行)、server.go(446行)、sql_audit.go(435行)、approval.go(435行) 仍超400行限制,可按同模式拆分
|
- 后端 pipeline.go(541行)、billing.go(476行)、server.go(446行)、sql_audit.go(435行)、approval.go(435行) 仍超400行限制,可按同模式拆分
|
||||||
- sidebar.tsx(689行) 可考虑提取 context/variants
|
- sidebar.tsx(689行) 可考虑提取 context/variants
|
||||||
|
|
||||||
|
## 2026-06-15 自动推进
|
||||||
|
|
||||||
|
- **任务**: 后端 pipeline.go 拆分(541行超400限制 → 2文件,按 流水线/应用发布 分域)
|
||||||
|
- **修改**:
|
||||||
|
- `backend/internal/api/handlers/pipeline.go` — 541→306行:仅保留 PipelineHandler struct + NewPipelineHandler + 流水线域(ListPipelines/GetPipeline/CreatePipeline/UpdatePipeline/DeletePipeline/TriggerPipeline/ListRuns 共 7 个方法)
|
||||||
|
- `backend/internal/api/handlers/pipeline_release.go` — **新建**(246行):应用发布域(ListReleases/CreateRelease/ApproveRelease/DeployRelease/RejectRelease/RollbackRelease 共 6 个方法),与 PipelineHandler 共享 receiver,同 package 无需改 routes.go
|
||||||
|
- **结果**:
|
||||||
|
- `go build -o aiops-server ./cmd/` 编译通过 ✅
|
||||||
|
- `go vet ./...` 零错误 ✅
|
||||||
|
- `./run.sh restart` 后健康检查 /health 正常 ✅
|
||||||
|
- curl 端到端验证(admin token):
|
||||||
|
- GET /pipelines → total 5 ✅(ListPipelines)
|
||||||
|
- GET /pipelines/1/runs → total 6 ✅(ListRuns)
|
||||||
|
- GET /releases → total 10 ✅(ListReleases,已迁移至 pipeline_release.go)
|
||||||
|
- POST /releases/1/approve → "审批成功" ✅(ApproveRelease,已迁移;验证后回滚 status 为 pending)
|
||||||
|
- 纯后端文件重组,无业务逻辑变更,前端零改动,routes.go 零改动
|
||||||
|
- **下一步建议**:
|
||||||
|
- 后端 billing.go(476行)、server.go(446行)、sql_audit.go(435行)、approval.go(435行)、navigation.go(428行) 仍超400行限制,可按同模式拆分
|
||||||
|
- sidebar.tsx(689行) 可考虑提取 context/variants
|
||||||
Reference in new issue
Block a user