deploy --target <name> fails at Persist step: CLI describes stacks for ALL targets, not just the one being deployed
- Dominant language
- TypeScript
- Stars
- 283
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 183
Description
## Description
`agentcore deploy --target ` fails at the **Persist** step. The CLI attempts to describe CloudFormation stacks for **all** configured targets instead of only the target being deployed. If any other target's stack doesn't exist (or isn't relevant to this deploy), the describe fails and the deploy errors out at Persist.
## Steps to Reproduce
1. Configure a project with more than one target (e.g. `qa` and others) where not every target has a deployed stack.
2. Run `agentcore deploy --target qa`.
3. Observe the failure at the Persist step.
## Expected Behavior
Deploying with `--target qa` should only describe/persist state for the `qa` target's stack. Other targets should be ignored.
## Actual Behavior
The CLI describes stacks for all targets, not just the one passed to `--target`, causing the Persist step to fail.
## CLI Version
`0.20.2`
## Operating System
Linux (WSL2 — `6.18.33.1-microsoft-standard-WSL2`, node `v22.22.0`)
## Additional Context
Reported via customer feedback (Aperture form submission).
> deploy --target qa fails at Persist step because CLI tries to describe stacks for ALL targets, not just the one being deployed
Contributor guide
Research direction
Start at the TypeScript entry point for `deploy --target` and trace the Persist step's stack-description logic. Reproduce the issue with multiple configured targets and an undeployed one; done means deploying `qa` describes and persists only `qa`'s stack without failing on other targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100