Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Partial deploy failure loses harness state — can create duplicate resources

未关闭 适合新手
#1,382 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
typescript
领域
cli, cloud

调研方向

从 HarnessDeployer.deploy() 和 actions.ts 第 531、541、584 行附近开始,跟踪失败时 deployedHarnesses 和 writeDeployedState() 的使用方式。确认失败的 deploy 在返回前会持久化成功的 harness A 状态,以便下一次 deploy 可以更新它,而不是创建重复资源。

由索引模型根据 Issue 内容生成。

描述

bug

Problem

If deploying harness B fails after harness A succeeds, the partial state (containing harness A's new ID) is never persisted to disk.

Flow:

  1. HarnessDeployer.deploy() returns { success: false, state: resultState } — resultState contains harness A's ID
  2. actions.ts:531 extracts the state into deployedHarnesses
  3. actions.ts:541 returns early with an error — before writeDeployedState() at line 584

On next deploy attempt, the state file doesn't know harness A exists. The deployer takes the CREATE path (createHarness with clientToken: randomUUID()), producing a duplicate cloud resource. The previous harness A is orphaned.

Expected behavior

Partial state should be persisted even on failure, so the next deploy attempt can UPDATE existing harnesses rather than re-creating them.

Possible fix

Write deployed state before the early return at line 541:

if (harnessDeployError) {
  // Persist partial state so successfully-created harnesses aren't orphaned
  await configIO.writeDeployedState(buildDeployedState(...));
  return { success: false, error: harnessDeployError };
}

Context

Found during review of #1341.

主要语言
TypeScript
星标
291
派生
96
平均合并
20 小时 50 分钟
30 天内合并 PR
214

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/agentcore-cli 的其他 Issue

查看 aws/agentcore-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。