Amplify-cli: Individual category `push` commands are equivalent to `amplify push`

Created on 7 Feb 2019  路  15Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
When attempting to push changes to the cloud for individual categories, all categories currently provisioned in the amplify app are pushed instead.

To Reproduce
Steps to reproduce the behavior:

  1. Provision multiple categories in an Amplify App
  2. Modify multiple categories such that at least two categories are in the Update status
  3. Attempt to push the changes to just one category, like amplify api push
  4. You will see that all the categories attempt to update, despite specifying you just want API (or whatever category) to update.

Expected behavior
Only changes to API (in this case) should be pushed to the AWS cloud; all other provisioned categories should remain in its current state.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 69
bug

Most helpful comment

More than one year later, this is still an issue. Any progress? Major productivity killer to not be able to push just one function for example.

All 15 comments

Could you clarify the following

  1. What version of amplify cli do you have installed?
  2. Was there any unsuccessful push before this?

@yuth

  1. 0.1.45
  2. Yes. My overall template is broken (happened when we briefly tried multienv then reverted to the original CLI) so I was only trying to push schema updates to the cloud.

Also, this behavior appears to afflict every category's push command, not just the API category.

@kaustavghosh06 @yuth in the meantime while this behavior is being resolved, are there any steps that can be taken to repair my overall cloudformation template so that I can do an overall amplify push?

Did migration to multienv succeed? Or was the template broke while migrating?

If it did, then we recommend you keep using multienv as we don't have support for migrating back older version using the CLI.

If you still want to use older version of CLI, you could try editing the cloudformation templates in <project-root>/backend/<category>/<name>/*-cloudformation-template.yaml> or <project-root>/backend/<category>/<name>/*-cloudformation-template.json> and try removing env from Parameters section of the CFN template.

Did migration to multienv succeed? Or was the template broke while migrating?

If it did, then we recommend you keep using multienv as we don't have support for migrating back older version using the CLI.

If you still want to use older version of CLI, you could try editing the cloudformation templates in <project-root>/backend/<category>/<name>/*-cloudformation-template.yaml> or <project-root>/backend/<category>/<name>/*-cloudformation-template.json> and try removing env from Parameters section of the CFN template.

Is there any way to export a clean version of the template with everything in its current (unupdated) status?

Unfortunately, we don't automatically back it up after migration.

If you're using a version control systems like git, you could checkout the version that was committed before migration and pushing that should restore you back to the state before migration

I installed the multienv CLI again and push worked fine. (I should note that we don't use the function or interactions categories currently, and amplify migrate reported a successful migration.) Thanks!

I'll leave this issue open to track the category-specific push bug.

Thank you for confirming that this is not caused by migration. This is in our backlog and we will get this prioritized.

Any updates on this one @yuth? Its very annoying, my deployment can take up to an hour to get through, even when I only need to to deploy a tiny lambda change.

Hey guys, we enabled individual category and resource name push. Please give it a try by installing the latest version of the CLI.

@kaustavghosh06 was this reverted? In 4.12.0 it still runs the entire deployment, even when pushing an individual category, such as auth or storage, using amplify <category> push.

@stefangomez @kaustavghosh06 i confirm using cli 4.13.1 version when doing amplify push it still runs the entire deployment.

@mdebo It would be running the Cloudformation deployment - which would include that category and resource - but it updated Cloudformation files are not updated - hence the changes won't take into affect if you do an individual category push.

More than one year later, this is still an issue. Any progress? Major productivity killer to not be able to push just one function for example.

Any updates?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

onlybakam picture onlybakam  路  3Comments

ReidWeb picture ReidWeb  路  3Comments

kangks picture kangks  路  3Comments

MageMasher picture MageMasher  路  3Comments

gabriel-wilkes picture gabriel-wilkes  路  3Comments