Open manu2504 opened 2 years ago
Hey @manu2504 :wave: thanks for raising this! By chance when you pulled your project originally did you select "No" to "do you plan on modifying this backend?"
Closing due to inactivity
@josefaidt sorry for missing the previous comment—I selected "No" for"do you plan on modifying this backend?" (In fact, as specified in the original post)
Hey @manu2504 thanks for clarifying and apologies for missing that in the report! It appears we have two issues here, one being the issue where pulling an env overwrites the existing env when we choose not to modify the backend, and the second being diagnose
not working in the event we choose not to modify the backend. I'll file a separate bug report for the latter.
The original issue seems related to https://github.com/aws-amplify/amplify-cli/issues/11066, where we would then be blocked on checking out existing local envs. I'm going to take a deeper look at this one
Any updates on this running into the same issue?
So I just did a new clone of our amplify repo and come to find out:
1) amplify init -> always creates new env 2) amplify pull -> replaces the existing env (amplify env ls - only shows 1 env) 3) I can no longer delete the unneeded environment with amplify cli
This is with version 11.1.1
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v12.22.12
Amplify CLI Version
10.4.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Nope.
Amplify Categories
auth
Amplify Commands
env
Describe the bug
When I pull an environment with
amplify env pull --envName ...
, the previous environment that was pulled on my project is removed, and replaced by the env just pulled (as shown byamplify env list
oramplify/team-provider-info.json
).Expected behavior
All the envs pulled should be saved locally—an env pulled should not replace previous env pulled.
Reproduction steps
amplify env add test
)amplify pull --appId ...
Do you plan on modifying this backend?
, respondNo
amplify env list
. See that one env is listed (dev).amplify env pull --envName test
amplify env list
. See that only env is listed (test), and that dev is no more listed.GraphQL schema(s)
Project Identifier
Running
amplify diagnose --send-report
triggers a bug:Log output
Additional information
This bug is new to me since I upgraded to 10.4.0. Pulling new envs worked as expected previously.