Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen2 migrations QA fixes #14088

Open
wants to merge 14 commits into
base: migrations
Choose a base branch
from
Open

Gen2 migrations QA fixes #14088

wants to merge 14 commits into from

Conversation

abhi7cr
Copy link
Contributor

@abhi7cr abhi7cr commented Jan 29, 2025

Description of changes

  • Fix import auth bug
  • Fix orphaned functions bug
  • Get function name from output key
  • Use resource name instead of function name for function folders in gen2
  • Print intermediate steps for the codegen command using ora
  • Rename generate-code to prepare to align with "preparing" for migration
  • Update gitignore to be Gen2 compliant

Issue #, if available

Description of how you validated changes

local testing, unit test

../../amplify-migrate/lib/migrate.js to-gen-2 prepare                                                         
✔ Fetched resource details from AWS
✔ Generated your Gen 2 backend code
✔ Updated gitignore contents
✔ Moved your Gen1 backend files to .amplify/migration

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@abhi7cr abhi7cr requested a review from a team as a code owner January 29, 2025 19:22
return fileWriter(content, path.join(filePath, 'resource.ts')).then(() => fileWriter('', path.join(filePath, 'handler.ts')));
return fileWriter(content, path.join(dirPath, 'resource.ts'))
.then(() => fileWriter('', path.join(dirPath, 'handler.ts')))
.catch(console.error);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This lets us surface typescript codegen errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant