Commit 57ee733
authored
Remove inline container build from vended cdk-stack.ts (#954)
* Remove DockerImageAsset from vended cdk-stack.ts
Container image building is now handled by AgentCoreHarnessEnvironment
inside the L3 CDK construct via CodeBuild, matching the runtime pattern.
The vended stack no longer needs DockerImageAsset, the toPascalId
helper, or the per-harness build loop. Update snapshot to match.
* Support both old and new CDK output key patterns for harness outputs
The new AgentCoreHarnessEnvironment construct nests AgentCoreHarnessRole
under a 'Role' child, which changes the CDK output key from
ApplicationHarness<Name>RoleArnOutput to ApplicationHarness<Name>Role
RoleArnOutput. Similarly, the container URI output moves from a stack-
level Harness<Name>ContainerUri key to ApplicationHarness<Name>ImageUri.
Update both resolvers to try the new pattern first, falling back to the
old pattern for backward compatibility with existing stacks that haven't
upgraded their CDK constructs.
* Align vended CDK field names with HarnessRoleConfig interface
The preview branch renamed dockerfile→dockerfileName and
codeLocation→harnessDir, but the CDK construct's HarnessRoleConfig
still uses dockerfile and codeLocation. Without matching field names,
AgentCoreHarnessEnvironment never sees the dockerfile and skips the
CodeBuild container build entirely.
* Add tests for new AgentCoreHarnessEnvironment CDK output key patterns
* fix(harness): include Dockerfile content in config hash
Editing a Dockerfile no longer silently keeps the old container image
live after redeploy. `computeHarnessHash` now reads and hashes the
Dockerfile (by name from `harnessSpec.dockerfile`) alongside
`harness.json` and `system-prompt.md`, so any content change produces
a new hash and triggers a real update.
* Address review: comment on prefix ordering + precedence tests for dual-key resolution1 parent 398dc50 commit 57ee733
7 files changed
Lines changed: 294 additions & 103 deletions
File tree
- src
- assets
- __tests__/__snapshots__
- cdk
- bin
- lib
- cli/operations/deploy/imperative/deployers
- __tests__
Lines changed: 11 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | 304 | | |
309 | 305 | | |
310 | 306 | | |
| |||
315 | 311 | | |
316 | 312 | | |
317 | 313 | | |
318 | | - | |
319 | | - | |
| 314 | + | |
| 315 | + | |
320 | 316 | | |
321 | 317 | | |
322 | 318 | | |
| |||
336 | 332 | | |
337 | 333 | | |
338 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | 358 | | |
395 | 359 | | |
396 | 360 | | |
397 | | - | |
| 361 | + | |
398 | 362 | | |
399 | 363 | | |
400 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 6 | | |
11 | 7 | | |
12 | 8 | | |
| |||
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
20 | | - | |
21 | | - | |
| 16 | + | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
| |||
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 60 | | |
97 | 61 | | |
98 | 62 | | |
99 | | - | |
| 63 | + | |
100 | 64 | | |
101 | 65 | | |
102 | 66 | | |
| |||
0 commit comments