fix(gen2-migration): generate command relies on local meta file#14415
Conversation
...mplify-cli/src/commands/gen2-migration/codegen-generate/src/codegen-head/command-handlers.ts
Show resolved
Hide resolved
|
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 Yes that means that right now migrating multiple environment at the same time is not supported. Thats ok. |
Description of changes
Currently, the
generatecommand relies on the existence of the localamplify-meta.jsonfile in various places. In a normal flow, customers rungenerateimmediately afterlock- which already relies on the same files so its not so bad.However, since
lockmarks which environment is being migrated using a remote env variable, we can remove this reliance by downloading the remoteamplify-meta.jsonfile on demand whenever necessary.Since the
generatecommand removes the localamplify-meta.jsonfile (intentionally) - this fix now allows us to rungeneratecommand twice in a row.Description of how you validated changes
Run
git clean -fdxand thegeneratecommand.Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.