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

Feature Request: More Robust Multienv push #594

Open
paulreimer opened this issue Dec 17, 2018 · 4 comments
Open

Feature Request: More Robust Multienv push #594

paulreimer opened this issue Dec 17, 2018 · 4 comments
Labels
feature-request Request a new feature multienv Issues tied to multiple environment feature in the CLI ops-multienv Operational theme: multi-environment p4 platform Issues tied to the general CLI platform

Comments

@paulreimer
Copy link

paulreimer commented Dec 17, 2018

THE PROBLEM(s)

  1. When using the multienv (beta) support, I've noticed that it is TOO easy to accidentally get into a situation where e.g. env X settings get pushed to env Y (if for example amplify init is skipped when changing branches).
  2. As well, it is made worse by the fact that before confirming the amplify push actions, an Update operation could refer to either "patch existing resource" or "delete-and-recreate resource" (yikes!).
  3. Finally, there isn't a general, ALL CAPS warning when any delete operation happens to existing auth resources.

IDEAL SOLUTION(s)

  1. I think it is a fundamental limit of the approach of coupling the envs to a git branch. I don't have a ready solution for the current approach, but other tooling would be more like amplify push --env production. Maybe this could be an optional argument anyway, so the amplify command would validate the env matches what was requested and aborts otherwise?
  2. Hopefully it is possible to differentiate an Update that is "patch" vs "recreate" and communicate that to the user, and/or print a complete list of the resources that will be changed (not just "auth" or "hosting"), and whether each resource existed already?
  3. I think a basic, dumb warning (or extra confirmation prompt) would help prevent a future disaster, as well (if necessary) an argument like --no-delete-warning to allow automated use but still indicate to script authors what (may) happen.
@paulreimer
Copy link
Author

paulreimer commented Dec 17, 2018

One other usability issue, I think related to multienv design being based on git branches -- it makes it hard to do operations in parallel to different envs, since only one branch can be checked out at a time. (e.g. "push-to-dev-env" and "delete-feature-sandbox-env" are things that I could do from different terminal windows, to save time).

@UnleashedMind UnleashedMind added feature-request Request a new feature multienv Issues tied to multiple environment feature in the CLI labels Dec 17, 2018
@hisham
Copy link
Contributor

hisham commented Dec 17, 2018

+1. This is related to my feature request of some kind of 'dry run' or preview support so that we know exactly what cloudformation is going to do. See #366

@hisham
Copy link
Contributor

hisham commented Dec 17, 2018

As a workaround, for the delete-and-recreate resource scenario, I'm thinking of just adding an IAM policy restricting the user amplify cli is running under to not be allowed to delete critical resources like Cognito userpools and Dynamo DB production databases. I have not done that yet but I assume that will work and be a good fail safe.

@UnleashedMind
Copy link
Contributor

@paulreimer @hisham
I marked 'feature request' for this issue.
We are working to improve the user experiences of the amplify-cli, thank you very much for your feedbacks.

@kaustavghosh06 kaustavghosh06 added the platform Issues tied to the general CLI platform label Mar 11, 2020
@ykethan ykethan added ops-multienv Operational theme: multi-environment p4 labels Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature multienv Issues tied to multiple environment feature in the CLI ops-multienv Operational theme: multi-environment p4 platform Issues tied to the general CLI platform
Projects
None yet
Development

No branches or pull requests

5 participants