Skip to content

fix(migrate): make the plan and next steps easier to read - #2612

Open
notgitika wants to merge 1 commit into
aws:refactorfrom
notgitika:fix/migrate-output-ux
Open

notgitika wants to merge 1 commit into
aws:refactorfrom
notgitika:fix/migrate-output-ux

Conversation

@notgitika

@notgitika notgitika commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Addresses the readability feedback on agentcore migrate from the bug bash notes:

  • Spacing. There's now a blank line between the progress lines (✓ Planning the refactor of …) and Migration plan: …. With --yes, there's also one before apply's progress.
  • Test-library note. The AGENTCORE_MIGRATE_CDK_LIBRARY note comes after Full plan: … and is one line. The install command only appears after migrating, in the next steps, which is when it's needed. This only shows when the test override is set.
  • Install from the project root. The install command is now npm install --prefix agentcore/cdk <lib> --no-save instead of cd agentcore/cdk && …, so agentcore deploy runs right after it without changing directory. It also works the same in shells where cd … && doesn't.
  • Plan file stack section:
    • It's flatter, with one First v1 deploy: … line and then one row per change (creates, deletes, replaces, updates).
    • Expected in-place updates no longer carry a warning label. That label made it look like there were two warning sections.
    • The separate Replacements: verdict is folded into the First v1 deploy line, which now also counts resources that must be kept.
    • A note under the refactor table explains that the new logical IDs come from the v1 CDK app's construct paths, and that only the IDs change.

Before:

  Then the first v1 deploy:
    updates in place
      warning AWS::BedrockAgentCore::Runtime ApplicationRuntimeAgentRuntime93CA6260: the v1 deploy updates it in place: EnvironmentVariables, … change
    creates, deletes, and replaces nothing else
  Replacements: 0 replacements; no resource that must be kept is replaced or deleted

After:

  First v1 deploy: replaces nothing; updates 1 resource in place
    updates   AWS::BedrockAgentCore::Runtime ApplicationRuntimeAgentRuntime93CA6260: EnvironmentVariables, … change

Related Issue

No public issue; this addresses bug bash feedback on #2584.

Documentation PR

Not applicable (CLI output only).

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

  • I ran bun test
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable. Instead of e2e, I ran it live: I deployed a new v0 project (runtime, memory and gateway) with CLI 0.31.1, previewed and migrated it with this build, then ran the printed npm install --prefix … and agentcore deploy from the project root. The deploy succeeded.
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

- Blank line between the progress lines and the summary, and before apply's progress with --yes.
- The preview shows the full plan link first; the AGENTCORE_MIGRATE_CDK_LIBRARY note is one line,
  and the install command appears only after migrating.
- The install command runs from the project root (npm install --prefix agentcore/cdk), so
  `agentcore deploy` follows without changing directory.
- The plan file's stack section is flatter: one row per change under a 'First v1 deploy' line,
  no 'warning' label on expected in-place updates, a note on where the new logical IDs come from,
  and no separate 'Replacements' verdict.
@github-actions github-actions Bot added the size/m PR size: M label Oct 16, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Oct 16, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Oct 16, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentCore Harness Review

Verdict: Looks good

This is a focused presentation/wording cleanup for agentcore migrate with matching test updates. The logic changes are small and sensible:

  • deployImpact now computes mustKeep and renders the actual blocker count. Previously the branch always said (none that must be kept) even when there were blockers in replaced/removed — this is a real bug fix.
  • The rows() helper unifies the per-change rendering; action is padded to width 8, which fits all four verbs (creates/deletes/replaces/updates).
  • overrideInstallCommand switches from cd agentcore/cdk && npm install … to npm install --prefix agentcore/cdk … --no-save, which keeps the user in the project root so the follow-up agentcore deploy just works. --prefix has been supported by npm for a long time.
  • The redundant the v1 deploy updates it in place: prefix is dropped from the update reason now that the row's action column already says updates.

Nothing jumped out as needing changes before merge.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Oct 16, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.59%. Comparing base (c480abb) to head (4235806).

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2612   +/-   ##
=========================================
  Coverage     96.58%   96.59%           
=========================================
  Files           700      700           
  Lines         57638    57631    -7     
=========================================
- Hits          55672    55666    -6     
+ Misses         1966     1965    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Oct 16, 2026
@notgitika
notgitika marked this pull request as ready for review October 16, 2026 20:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants