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

Running "amplify pull --yes" appears to cause upload/push.

Open BennettSmith opened this issue 6 years ago • 5 comments

Describe the bug Our build script performs an amplify pull --providers {filename} --frontend {filename} --amplify {filename} --yes. Recently we noticed that this is causing the environment to be pulled from the backend and then uploaded/pushed again. If we remove the --yes argument, then we are prompted with the question about making changes. We answer Y to this, and the pull happens as we expect (i.e. it is not followed up with an upload/push).

Amplify CLI Version We are running version 4.29.0 of the cli.

To Reproduce Perform a pull as mentioned int he description. Try it with and without the --yes switch to see the difference in behavior.

Expected behavior We expect that performing a pull will not cause any files to be uploaded or deployed to the environment on the backend.

Desktop (please complete the following information): Running on a Mac with 10.15.6. Node.js version is v10.21.0

BennettSmith avatar Sep 08 '20 17:09 BennettSmith

More information:

When I run the amplify pull command with --yes and it does the push, it doesn't even seem to be complete. One part of our app is to use the PostConfirmation trigger for Cognito. The GROUP environment variable ends up being blank after this unexpected push, as seen in the screen shot attached.

Screen Shot 2020-09-08 at 10 28 22 AM

Being blank causes another failure when trying to use the backend environment. The error is valid, but should not happen if a push is done properly.

caught error: "userLambdaValidation(message: "PostConfirmation failed with error 2 validation errors detected: Value \'\' at \'groupName\' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+; Value \'\' at \'groupName\' failed to satisfy constraint: Member must have length greater than or equal to 1.")"

BennettSmith avatar Sep 08 '20 17:09 BennettSmith

+1

mrgrue avatar Sep 17 '20 21:09 mrgrue

+1. We have a CD process setup through Vercel and require the --yes headless option, but since it runs a subsequent push after the pull, it slows down the deploy time significantly as we have a large app with many resources. The push is not expected or desired.

blydewright avatar Sep 29 '20 05:09 blydewright

This has been fixed in version 4.30.0 of the CLI. If you still want to do a push after a pull you can use the --forcePush option, but just --yes will no longer do a push.

edwardfoyle avatar Oct 26 '20 22:10 edwardfoyle

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 25 '21 17:05 github-actions[bot]