Repository navigation
fix(cli): classify migration categories by prefix - #14901
hariharan077 wants to merge 2 commits into
Conversation
|
Following up on this fix for #14609. The current branch has no merge conflicts, and there are no outstanding inline review comments. The change keeps category detection prefix-based, with regression coverage for names such as Could a maintainer review the change and check whether CI needs to be enabled for this contribution? No commit status checks or pull-request workflow runs are currently reported for |
|
Updated this branch to current dev ( The CLI and its workspace dependencies build successfully. The full CLI package suite passed locally with 133 suites, 887 tests, and 138 snapshots. The focused regression, lint, and formatting checks also passed. Could a code owner review the updated branch and start the required CI checks if they are still waiting to run? |
Description
Fixes #14609.
extractCategory()previously classified logical IDs by checking whether category names appeared anywhere in the ID. That made the result order-dependent, so a storage resource such asstorageauthbackupwas reported asAuthbecauseauthappeared later in the resource name.This changes category detection to use known Amplify category prefixes and keeps core infrastructure detection prefix-based as well.
Validation
storageauthbackupreturnedAuthinstead ofStorage.corepack yarn workspace @aws-amplify/cli-internal test src/__tests__/commands/gen2-migration/_common/categories.test.ts --runInBand --no-coveragecorepack yarn workspace @aws-amplify/cli-internal test src/__tests__/commands/drift --runInBand --no-coveragecorepack yarn workspace @aws-amplify/cli-internal test src/__tests__/commands/gen2-migration/_common/categories.test.ts src/__tests__/commands/drift/services/drift-formatter.test.ts --runInBand --no-coveragecorepack yarn prettier --check packages/amplify-cli/src/commands/gen2-migration/_common/categories.ts packages/amplify-cli/src/__tests__/commands/gen2-migration/_common/categories.test.tscorepack yarn eslint packages/amplify-cli/src/commands/gen2-migration/_common/categories.ts packages/amplify-cli/src/__tests__/commands/gen2-migration/_common/categories.test.tscorepack yarn sanitize-migration-appscorepack yarn build-tests-changedgit diff --check