Skip to content

fix(gen2-migration): generate command relies on local meta file#14415

Merged
sanjanaravikumar-az merged 2 commits intogen2-migrationfrom
epolon/generate-no-depend-on-local-files
Jan 2, 2026
Merged

fix(gen2-migration): generate command relies on local meta file#14415
sanjanaravikumar-az merged 2 commits intogen2-migrationfrom
epolon/generate-no-depend-on-local-files

Conversation

@iliapolo
Copy link
Contributor

@iliapolo iliapolo commented Dec 30, 2025

Description of changes

Currently, the generate command relies on the existence of the local amplify-meta.json file in various places. In a normal flow, customers run generate immediately after lock - which already relies on the same files so its not so bad.

However, since lock marks which environment is being migrated using a remote env variable, we can remove this reliance by downloading the remote amplify-meta.json file on demand whenever necessary.

Since the generate command removes the local amplify-meta.json file (intentionally) - this fix now allows us to run generate command twice in a row.

Description of how you validated changes

Run git clean -fdx and the generate command.

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.

@iliapolo iliapolo requested a review from a team as a code owner December 30, 2025 00:12
@dgandhi62
Copy link
Contributor

If I understand correctly, we won't be marking the env for migration anymore right?

I wanted to clarify this earlier - if an environment is marked for migration, at what point do we unmark it? The client might want to migrate multiple envs

@iliapolo
Copy link
Contributor Author

If I understand correctly, we won't be marking the env for migration anymore right?

I wanted to clarify this earlier - if an environment is marked for migration, at what point do we unmark it? The client might want to migrate multiple envs

We are still marking it during lock. All other commands rely on this marking to grab the right environment. Unmarking will happen when migration is over, i.e the decommission command.

Yes that means that right now migrating multiple environment at the same time is not supported. Thats ok.

@sanjanaravikumar-az sanjanaravikumar-az merged commit 40f6d39 into gen2-migration Jan 2, 2026
4 checks passed
@sanjanaravikumar-az sanjanaravikumar-az deleted the epolon/generate-no-depend-on-local-files branch January 2, 2026 21:30
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.

4 participants