Repository navigation
Commit 759924e
feat(migrate)!: add agentcore migrate (#2584)
agentcore migrate upgrades a v0 project to the v1 format without replacing
any deployed resource.
- One flow: every run computes the full read-only preview from scratch,
shows a short summary on stdout (the full plan goes to
agentcore/.cli/migrate/plan-<UTC>.md, which the git check ignores), then
asks "Apply these changes?" on a terminal. --yes skips only
the prompt; non-interactive and --json runs without --yes stop after the
preview. There is no --dry-run.
- Names: the converted agentcore.json sets migratedFrom: "v1", so the CDK
library keeps every v0 physical name.
- Stacks: logical IDs move to v1's with CloudFormation stack refactoring,
one deployment target at a time (--target when several are deployed;
others are recorded as pending and finished later with --target). Every
step is recorded first in an atomic journal
(agentcore/.cli/migration-state.json), so an interrupted run is finished
or undone by running migrate again.
- Deploying a target the journal still lists is refused, in the project
manager's deploy (CLI, TUI, harness dev) and the v0 deploy delegation.
- Any file added or changed in agentcore/cdk blocks, since migrating
replaces it; files are compared with what each v0 release vended.
- Only a 4xx from ExecuteStackRefactor counts as not started; other
failures are unknown, keep the journal with the refactor ID, never put
files back, and print the commands to check it.
- Credential providers of a migrated project keep v0's bare names and are
never deleted.
- Migration is blocked until the CLI vends an @aws/agentcore-cdk release
that honors migratedFrom (AGENTCORE_MIGRATE_CDK_LIBRARY overrides it for
testing only).
- Progress uses the shared runWithProgress task list on stderr, including
the stack's resource events while a refactor executes. With the testing
override, the summary and the next steps show the npm install command for
the library the plan was made with.
Co-authored-by: gitikavj <gitikavj@amazon.com>1 parent 0c43c32 commit 759924e
101 files changed
Lines changed: 30168 additions & 220 deletions
File tree
- scripts
- src
- core
- project
- backends
- cdk
- migrate
- __fixtures__
- templates
- v0-app
- templates
- handlers
- project
- deploy
- dev
- migrate
- projectSchemas
- testing
- tui
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
82 | 131 | | |
83 | 132 | | |
84 | 133 | | |
| |||
127 | 176 | | |
128 | 177 | | |
129 | 178 | | |
130 | | - | |
| 179 | + | |
131 | 180 | | |
132 | 181 | | |
133 | | - | |
| 182 | + | |
134 | 183 | | |
135 | 184 | | |
136 | | - | |
| 185 | + | |
137 | 186 | | |
138 | 187 | | |
139 | 188 | | |
| |||
196 | 245 | | |
197 | 246 | | |
198 | 247 | | |
| 248 | + | |
199 | 249 | | |
200 | 250 | | |
201 | 251 | | |
202 | 252 | | |
203 | 253 | | |
204 | 254 | | |
205 | 255 | | |
206 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
207 | 262 | | |
208 | | - | |
| 263 | + | |
| 264 | + | |
209 | 265 | | |
210 | | - | |
| 266 | + | |
211 | 267 | | |
212 | 268 | | |
213 | 269 | | |
| |||
0 commit comments