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

Project deploy: same project name + target collides on one CloudFormation stack

未关闭
#2,104 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
39/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
aws, typescript

调研方向

从 src/assets/cdk/bin/cdk.ts 及其 toStackName 逻辑开始,然后检查 src/core/project/backends/cdk.ts 中现有的 account 检查。跟踪 project 初始化和 agentcore.json project spec,以确定应将已提交的稳定 id 放在哪里。当同名 project 不再发生冲突,并且 deployment 拒绝携带不同 project id 的 stack 时,即表示完成。

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

描述

Summary

Two separate projects that share the same name (in agentcore.json) and target, deployed to the same account+region, resolve to the same CloudFormation stack. The second deploy updates/overwrites the first project's stack instead of creating its own.

Repro

  1. Create two projects in different directories, both name: "demo".
  2. agentcore deploy --target default from each, same account+region.
  3. Both map to stack AgentCore-demo-default; the second deploy overwrites the first's stack.

Root cause

Stack identity is derived solely from (project name, target name) — AgentCore-<name>-<target> (src/assets/cdk/bin/cdk.ts toStackName). The project spec has no stable unique id distinct from the human-chosen name, and the agentcore:project-name tag is just the name, so nothing disambiguates two same-named projects. The deploy path only verifies the account matches the target (src/core/project/backends/cdk.ts), not project identity.

Impact

Silent overwrite of another project's deployed resources when names collide in a shared account+region.

Suggested fix

Generate a stable project id at project init, store it committed in agentcore.json, stamp it as a stack tag (e.g. agentcore:project-id), and refuse to deploy when an existing stack of that name carries a different id.

主要语言
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 摘要。