Conversation
Coverage Report
|
|
Preflight change may not actually achieve its goal — CDK subprocess reads The previous code patched the raw JSON on disk specifically because the CDK synth runs as a separate Node subprocess ( See const configIO = new ConfigIO({ baseDir: configRoot });
const spec = await configIO.readProjectSpec(); // fresh read from diskSo the PR description's claim — "the CDK reads the patched object at synth time without touching the user's file" — isn't accurate. The in-memory patch is dead code with respect to the CDK subprocess. If the published Also worth noting: the PR test plan has A few ways to fix:
|
|
Teardown of AB tests is missing three things the normal removal flow does The new teardown loop over
Suggested fix: either
The config bundle cleanup looks fine as-is — just |
…urces - Preflight: remove config bundle type patching entirely — the CDK schema does not have a type field, so neither the on-disk write (original) nor the in-memory patch was needed - Teardown: delegate to deleteOrphanedABTests and deleteOrphanedHttpGateways instead of raw deleteABTest/deleteHttpGatewayWithTargets — reuses stop/poll/delete/role-cleanup logic. Correct ordering: AB tests first (they create rules on gateways), then gateways, then config bundles. Closes #1070
65c6431 to
df4f480
Compare
Summary
Two fixes for issues identified during #1068 review:
1. Deploy preflight no longer rewrites agentcore.json
validateProject()was injectingtype: "ConfigurationBundle"into config bundle entries and writing the file back to disk on everyagentcore deploy. This caused surprise git diffs and clobbered file formatting. The type discriminator is now applied in-memory only — the CDK reads the patched object at synth time without touching the user's file.2. Config bundles and AB tests cleaned up on stack teardown
performStackTeardownalready deleted HTTP gateways before destroying the CFN stack, but config bundles and AB tests were left orphaned in AWS. Now iteratesdeployedState.targets[target].resources.configBundlesand.abTestsand deletes them, matching the existing HTTP gateway pattern.Closes #1070
Test plan
npm run typecheckpassesagentcore deploywith config bundles does not modify agentcore.json on diskagentcore remove all+agentcore deploycleans up config bundles and AB tests