Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,16 @@ msgstr "Erstellung von {name} fehlgeschlagen: {reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "Erstellung von {name} fehlgeschlagen: {reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "Felder werden für Aktion '{action}' nicht unterstützt: {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "Erforderliche Felder für Aktion '{action}' fehlen: {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3974,6 +3984,11 @@ msgstr "ROS-Stack erstellen: {target}"
msgid "Continue ROS stack creation: {target}"
msgstr "Erstellung des ROS-Stacks fortsetzen: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "Auf Erstellung des ROS-Stacks warten: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/es/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3949,6 +3949,16 @@ msgstr "Error al crear {name}: {reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "Error al crear {name}: {reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "Los campos no son compatibles con la acción '{action}': {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "Faltan campos obligatorios para la acción '{action}': {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3959,6 +3969,11 @@ msgstr "Crear pila ROS: {target}"
msgid "Continue ROS stack creation: {target}"
msgstr "Continuar la creación de la pila ROS: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "Esperar a que se cree la pila ROS: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3959,6 +3959,16 @@ msgstr "Échec de la création de {name} : {reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "Échec de la création de {name} : {reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "Les champs ne sont pas pris en charge pour l'action '{action}' : {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "Champs obligatoires manquants pour l'action '{action}' : {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3969,6 +3979,11 @@ msgstr "Créer la pile ROS : {target}"
msgid "Continue ROS stack creation: {target}"
msgstr "Continuer la création de la pile ROS : {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "Attendre la création de la pile ROS : {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/ja/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3750,6 +3750,16 @@ msgstr "{name} の作成に失敗しました: {reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "{name} の作成に失敗しました: {reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "アクション '{action}' ではサポートされていないフィールドです: {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "アクション '{action}' に必須フィールドがありません: {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3760,6 +3770,11 @@ msgstr "ROS スタックを作成: {target}"
msgid "Continue ROS stack creation: {target}"
msgstr "ROS スタックの作成を続行: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "ROS スタックの作成を待機: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/pt/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3922,6 +3922,16 @@ msgstr "Falha ao criar {name}: {reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "Falha ao criar {name}: {reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "Os campos não são compatíveis com a ação '{action}': {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "Campos obrigatórios ausentes para a ação '{action}': {fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3932,6 +3942,11 @@ msgstr "Criar pilha ROS: {target}"
msgid "Continue ROS stack creation: {target}"
msgstr "Continuar a criação da pilha ROS: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "Aguardar a criação da pilha ROS: {target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
15 changes: 15 additions & 0 deletions src/iac_code/i18n/locales/zh/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -3699,6 +3699,16 @@ msgstr "{name} 创建失败:{reason} ({stack_id})"
msgid "{name} creation failed: {reason}"
msgstr "{name} 创建失败:{reason}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Fields are not supported for action '{action}': {fields}"
msgstr "操作 '{action}' 不支持这些字段:{fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Missing required field(s) for action '{action}': {fields}"
msgstr "操作 '{action}' 缺少必填字段:{fields}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Create ROS stack: {target}"
Expand All @@ -3709,6 +3719,11 @@ msgstr "创建 ROS 资源栈:{target}"
msgid "Continue ROS stack creation: {target}"
msgstr "继续创建 ROS 资源栈:{target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Wait for ROS stack creation: {target}"
msgstr "等待 ROS 资源栈创建:{target}"

#: src/iac_code/pipeline/selling/tools/ros_deploy_tool.py
#, python-brace-format
msgid "Delete failed ROS stack and create replacement: {target}"
Expand Down
2 changes: 1 addition & 1 deletion src/iac_code/pipeline/selling/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ steps:
required_conclusion_field: stack_id
require_tool_result:
tool: ros_deploy
action_in: [create, continue_create, delete_and_create]
action_in: [create, continue_create, delete_and_create, wait]
is_success: true
status_in: [CREATE_COMPLETE]
match_conclusion_field: stack_id
Expand Down
6 changes: 3 additions & 3 deletions src/iac_code/pipeline/selling/prompts/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## 部署执行
用户已在上一步确认选择了该方案,该选择等价于本步骤的部署确认。不要再次询问是否确认部署,也不要询问是否确认部署参数。`selected_plan.preview_ready_for_create` 为 `true` 时按快速创建路径执行,快速创建路径见技能;否则按常规部署路径执行。

本步骤的部署与失败恢复入口仅为 `ros_deploy`,不要绕过它调用原始 ROS 部署生命周期接口。删除约束和失败恢复策略见技能。
本步骤的部署、等待与失败恢复入口仅为 `ros_deploy`,不要绕过它调用原始 ROS 部署生命周期接口。删除约束和失败恢复策略见技能;超时等待策略也见技能

## 原始用户需求与约束
部署时必须继续遵守原始用户需求中的地域、资源命名、StackName、是否复用已有资源等约束。如果这些约束与候选方案、模板文件名或默认参数冲突,以原始用户需求为准。
Expand All @@ -27,7 +27,7 @@
## ROS 模板来源
本步骤已选定模板文件路径:`{selected_plan.template_url}`。

需要调用 `ros_validate_template` 校验时,必须传 `template_url = "{selected_plan.template_url}"`。调用 `ros_deploy` 时,必须传 `template_url = "{selected_plan.template_url}"`。不要通过 `aliyun_api` 调用 ROS 模板校验或部署生命周期接口;不要传 `TemplateBody`、`TemplateId` 或 `TemplateScratchId`;不要省略 `template_url`。
需要调用 `ros_validate_template` 校验时,必须传 `template_url = "{selected_plan.template_url}"`。调用 `ros_deploy` 的 `create` / `continue_create` / `delete_and_create` 时,必须传 `template_url = "{selected_plan.template_url}"`;调用 `ros_deploy` 的 `wait` 时不要传 `template_url`。不要通过 `aliyun_api` 调用 ROS 模板校验或部署生命周期接口;不要传 `TemplateBody`、`TemplateId` 或 `TemplateScratchId`;部署类动作不要省略 `template_url`。

## 所有候选方案的评估数据
`selected_plan.selection_valid` 为 `true` 时,使用 `selected_plan.selected_candidate` 和
Expand All @@ -47,7 +47,7 @@

## 错误处理
- 模板校验失败 → 就地修复模板后重试(最多 5 轮)
- 部署失败 → 按技能的 `ros_deploy` 恢复策略处理;只调整部署参数时由 `ros_deploy` 的部署调用做最终校验
- 部署失败或等待超时 → 按技能的 `ros_deploy` 恢复策略处理;只调整部署参数时由 `ros_deploy` 的部署调用做最终校验
- 架构层面必须变更(如产品组合不可行)→ rollback_request 到 `architecture_planning`

## 注意事项
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ conclusion_schema:
- `selected_plan.preview_ready_for_create` 为 `true` 时,表示成本步骤已对同一模板路径完成预览验证,且没有完整部署参数缺口;部署时直接调用 `ros_deploy` 的 `create`,跳过例行 `ros_validate_template`,并跳过例行可用性查询。用户覆盖后的最终部署参数由 `ros_deploy` 的部署调用做最终校验。
- 否则,部署前必须校验模板文件。调用 `ros_validate_template` 校验,`template_url` 使用当前步骤 prompt 中已选定的具体模板文件路径;已有具体地域时传 `region_id`,否则使用工具默认地域。不要通过 `aliyun_api` 调用 ROS 模板校验或部署生命周期接口。校验失败时分析错误原因,查 GetResourceType Schema(如需),修复模板文件后重试(最多 5 轮)。模板文件会被后续步骤依赖,必须确保其内容正确后再继续。
- `ros_deploy` 的 `create` 失败后,如果需要修改模板,成本步骤的预览验证已失效;修复后必须重新调用 `ros_validate_template`,通过后再调用 `ros_deploy` 的 `continue_create`。只调整部署参数时,不需要为了参数变化补跑 `ros_validate_template`;最终参数由 `ros_deploy` 的部署调用校验。
- `ros_deploy` 的 `create` / `continue_create` / `delete_and_create` 已经发起 ROS 操作但工具调用超时或中断时,不要再次调用创建类动作。使用同一 `stack_id` 调用 `ros_deploy` 的 `wait`,它只轮询已有 Stack 的创建进度,不会调用 CreateStack 或 ContinueCreateStack。

## 可用性查询

Expand All @@ -78,6 +79,7 @@ conclusion_schema:
| ros_deploy create | 全量查询所有库存相关 Parameters |
| ros_deploy continue_create | 查询失败资源相关的 Parameters |
| ros_deploy delete_and_create | 按替代创建参数全量查询库存相关 Parameters |
| ros_deploy wait | 不查询库存;仅等待已发起创建的 Stack 达到终态 |

查询步骤:
1. 解析模板 Parameters,识别库存相关参数及对应产品
Expand All @@ -104,19 +106,22 @@ conclusion_schema:
- `ros_deploy` 的 `create` 必须传 `stack_name`,不要省略,不要使用容易重复的固定名称。
- `ros_deploy` 的 `continue_create` 面向已有失败 Stack 时,使用 `create` 失败结果中的 Stack 标识,不要生成新的 StackName。
- `ros_deploy` 的 `delete_and_create` 面向已有失败 Stack 时,`stack_id` 使用旧失败 Stack 标识;`stack_name` 使用替代创建目标的名称。
- `ros_deploy` 的 `wait` 面向已有创建中 Stack 时,只传 `stack_id` 和 `region_id`;不要传 `template_url`、`parameters`,不要生成新的 StackName。

## 执行部署

- 使用 `ros_deploy` 工具执行 `create` / `continue_create` / `delete_and_create`,禁止用 Bash
- 使用 `ros_deploy` 工具执行 `create` / `continue_create` / `delete_and_create` / `wait`,禁止用 Bash
- `ros_deploy` 的 `create` 会使用 `DisableRollback: true`
- `ros_deploy` 使用装配后的 `parameters` 字典;不要手动展开为 `Parameters.N.ParameterKey`
- `ros_deploy` 的 `wait` 只等待已有 Stack 创建完成,不发起创建、继续创建、删除或更新
- `ros_deploy` 的创建类动作使用装配后的 `parameters` 字典;不要手动展开为 `Parameters.N.ParameterKey`

> **template_url 支持本地文件路径**:`ros_deploy` `template_url` 可传本地文件路径(如 `/tmp/template.yml`),工具会自动读取文件内容。避免将大模板内容直接作为参数传递。
> **template_url 支持本地文件路径**:`ros_deploy` 的创建类动作中,`template_url` 可传本地文件路径(如 `/tmp/template.yml`),工具会自动读取文件内容。避免将大模板内容直接作为参数传递。

## 错误处理

### 部署失败
分析错误原因:
- 工具调用超时但已有 `stack_id`,且 Stack 仍在创建 → 调用 `ros_deploy` 的 `wait`
- 权限/配额 → 告知用户处理
- 模板/参数 → 修复后调用 `ros_deploy` 的 `continue_create`
- `continue_create` 返回 `ContinueCreateStackValidationFailed` → 告知用户需要重建本步骤创建的失败 Stack,再调用 `ros_deploy` 的 `delete_and_create`
Expand Down
Loading
Loading