fix(engine): 阻止已撤销流程继续执行节点调度 --story=135505027 - #275
Closed
dengyh wants to merge 1 commit into
Closed
Conversation
This was referenced Jul 30, 2026
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.
问题
根流程被撤销后,异步节点的调度入口只检查节点自身仍为
RUNNING,没有检查根流程已是REVOKED。因此长定时、轮询和回调类节点仍可能在撤销后进入插件schedule,并继续产生副作用。修复
Engine.schedule获取调度锁和调用插件前检查根流程状态。REVOKED时将当前 schedule 标记为过期并立即返回。影响范围
统一覆盖使用 bamboo-engine schedule 机制的定时、轮询和回调节点,不针对具体插件做特判。
验证
tests/engine/test_engine_schedule.py: 14 passedflake8 bamboo_engine/engine.py tests/engine/test_engine_schedule.py: passed联动