amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Merge conflicts with multi-env with "amplify checkout env xxx"

Open OperationalFallacy opened this issue 11 months ago • 2 comments

Amplify CLI Version

12.10.1

Question

There is a file cli-input.json that contains oAuthMetadata, with CallbackURLs and LogoutURLs props

Those properties are different for each environment. Which is causing conflict when switching "env" branches and merging changes between them.

Is there a way to avoid constant merge conflicts?

The workaround I'm using is to keep separate config files, cli-inputs-dev.json and copy them over when applying changes. Not very convenient.

Thanks!

OperationalFallacy avatar Feb 26 '24 18:02 OperationalFallacy

Hi @OperationalFallacy, unfortunately there isn't currently a mechanism for parameterizing those values between environments. What you are currently doing is probably the best workaround (although I agree it's clunky). Marking this as a feature request.

edwardfoyle avatar Feb 27 '24 17:02 edwardfoyle

Wanted to add to the list of checkout griefs The checkouts of front-end is even more complicated with dedicated environments in separated accounts

  1. the amplify env checkout doesn't work because standalone front-end dir (not backend edits there)
  2. I have to do "amplify pull --appId xxx --envName prod", because its different aws accounts for environments
  3. that pull tries to overwrite Amplify Studio UI settings, which I had to keep in one env, because they can't be synced
  4. and finally, similarly to the problem with cli-inputs, it overwrites amplifyconfiguration.json which is again env specific

OperationalFallacy avatar Feb 28 '24 04:02 OperationalFallacy