aws / aws/agentcore-cli

deploy (TUI): multi-target pick only persists state + transaction search for the first selected target

Open
#1,697 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

## Summary
Follow-up from #1267 / PR #1659.

When a user multi-selects targets in the TUI deploy picker (e.g. `A` and `C`), the deploy is correctly scoped to **all** selected stacks and both deploy. However the post-deploy bookkeeping in `useDeployFlow.ts` operates on a single `activeTarget` (`selectedTargets?.[0]`), so:

- **Deployed-state** is persisted only for the first selected target.
- **CloudWatch Transaction Search** is enabled only in the first selected target's account/region.

The other selected targets deploy fine but show up empty in `status` / `invoke` and have no transaction search wired.

## Current mitigation
PR #1659 adds a **warning** when more than one target is picked, telling the user that only the first target's state was recorded and to re-run `deploy` selecting the others. This closes the *silent* part of the gap but not the underlying single-target bookkeeping.

## Proposed fix
Loop the post-deploy bookkeeping over **every** selected target rather than just `activeTarget`:
- `persistDeployedState` should poll + write deployed-state for each selected target's stack/region.
- Transaction-search setup should run per selected target account/region.

## Notes
- Pre-existing behavior (persist has always used `awsTargets[0]`); not a regression introduced by #1659.
- Scope was intentionally kept out of #1659 to keep that PR focused on deploy scoping.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.