fix(pipeline): fail deploying step when ROS deployment fails - #300
Closed
ruanzhengxin-zhuxing wants to merge 1 commit into
Closed
fix(pipeline): fail deploying step when ROS deployment fails#300ruanzhengxin-zhuxing wants to merge 1 commit into
ruanzhengxin-zhuxing wants to merge 1 commit into
Conversation
ros_deploy returning CREATE_FAILED still ended the selling pipeline as a successful run: complete_step always produced StepStatus.COMPLETED, so the deploying step was marked completed, no STEP_FAILED/rollback path ran, and the ROS status_reason was never guaranteed to reach the user. - add a declarative step-level failure_condition (field/value/reason_fields) parsed strictly by the loader - map a matching failure conclusion to StepStatus.FAILED in StepExecutor (both fresh and resumed steps), keeping on_exit/set_conclusion and the existing rollback_request path intact - require status_reason on a failed deploying conclusion via a new completion guard plus the deploying skill conclusion schema - make prompt/skill mandate reporting status_reason and entering retry/rollback before giving up
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.
背景
Harness work item 2852f480-259b-464d-a095-5b02914a3c1d
ros_deploy返回CREATE_FAILED时,deploying步骤仍被标记为completed,未触发回滚/重试,也未向用户报告status_reason。根因
成功的
complete_step调用一律产出StepStatus.COMPLETED。deploying步骤forward: null且没有任何 exit/failure 映射,因此PipelineRunner直接advance()并以成功状态结束流水线:没有STEP_FAILED事件、没有回滚,status_reason也无法保证传达给用户。变更
StepSpec新增声明式failure_condition(field/value/reason_fields),loader提供严格校验。StepExecutor在新执行路径与恢复路径上,把匹配failure_condition的结论映射为StepStatus.FAILED并携带用户可见error,同时保留set_conclusion、on_exit与既有rollback_request行为。selling/pipeline.yaml的deploying步骤声明failure_condition以及针对status: failed的 completion guard(强制status_reason)。prompts/deploying.md与skills/iac-aliyun-deploying/SKILL.md明确要求先上报status_reason,再重试/回滚到候选选择,最后才允许收敛为failed。hooks/deploying.py新增on_exit,在缺失时用error回填status_reason。验证
ruff check src/ tests/通过ty check src/通过pytest tests/pipeline:1628 passed(1 项既有失败,与本变更无关)pytest tests/web tests/agent tests/cli tests/acp tests/ui tests/skill_bridge:4068 passed(5 项既有失败)