fix(deploy): 完善流量录制持久化 - #277
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #277 +/- ##
==========================================
+ Coverage 72.24% 72.44% +0.20%
==========================================
Files 244 244
Lines 14416 14442 +26
Branches 4810 4817 +7
==========================================
+ Hits 10415 10463 +48
+ Misses 2618 2595 -23
- Partials 1383 1384 +1
🚀 New features to boost your workflow:
|
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.
Summary
将生产环境的流量录制 fixture 默认写入
/app/data/traffic-recordings,并通过autorouter-datanamed volume 保留容器重建与版本升级后的录制文件。同时修正过期录制清理在文件竞态消失时的幂等计数语义。Related Issue
无现成 Issue;本 PR 对应分支
fix/traffic-recording-persistence的部署持久化意图。Type of Change
Changes
nextjs用户运行。tests/fixtures部署的备份、路径迁移和升级说明。ENOENT时按幂等成功计数,不恢复可能已被其他清理任务删除的索引。Test Plan
pnpm test:run tests/unit/services/traffic-recording-service.test.ts tests/unit/deployment/traffic-recording-persistence.test.ts)pnpm exec tsc --noEmit)pnpm lint)Checklist
Additional Notes
本地 pre-commit hooks(Prettier、ESLint、TypeScript)均通过;
pnpm docs:build通过。旧部署必须在重建容器前按文档完成 fixture 迁移,否则旧容器可写层中的文件无法自动恢复。