fix(debug): 收敛调试终止后的节点状态 --story=135505027 - #840
Merged
dengyh merged 1 commit intoJul 30, 2026
Merged
Conversation
This was referenced Jul 30, 2026
There was a problem hiding this comment.
Review Summary
本 PR 为调试节点状态新增 revoked 状态,处理引擎任务被撤销时的节点状态收敛逻辑。变更包含:
- Model 字段扩展 —
DebugNodeState.STATUS_CHOICES新增revoked,附带正确的 migration 文件 ✅ - Service 逻辑 — 在
sync_from_debug_task中检测REVOKED引擎状态后批量更新活跃节点 ✅ - 测试覆盖 — 参数化测试覆盖了 running/waiting/paused 三种活跃状态的收敛 ✅
整体实现简洁正确,ENGINE_RUN_STATE_MAP 和 ENGINE_FINISHED_STATES 已预先包含 REVOKED 映射,上下游逻辑自洽。
✨ 小建议
service.py:575 的 if engine_state == "FAILED" 可改为 elif,因为与上方 REVOKED 分支互斥,语义更清晰(非阻塞建议)。
整体质量良好,无 Critical / Important 级别问题。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #840 +/- ##
========================================
Coverage 83.60% 83.60%
========================================
Files 324 324
Lines 20722 20724 +2
========================================
+ Hits 17324 17326 +2
Misses 3398 3398 ☔ View full report in Codecov by Harness. 🚀 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.
问题
调试任务整体已经进入
REVOKED并释放 active 锁后,子节点在引擎状态树中仍可能保持RUNNING/SUSPENDED。BKFlow 将这些节点继续映射为running、waiting或paused,导致页面长期显示“调试中”。修复
DebugNodeState增加节点级revoked状态及迁移。REVOKED时,将仍处于running、waiting、paused的节点统一收敛为revoked。验证
upstream/develop基线:调试模块 79 passed联动