amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

Unable to push

Open LeoReubelt opened this issue 2 years ago • 7 comments

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v16.14.0

Amplify CLI Version

12.0.3

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.

No

Describe the bug

I tried amplify push --allow-destructive-graphql-schema-updates and got....

🛑 A deployment is in progress. 🛑 If the prior rollback was aborted, run: 🛑 "amplify push --iterative-rollback" to rollback the prior deployment 🛑 "amplify push --force" to re-deploy

so I tried amplify push --iterative-rollback and got...

An error occurred during the push operation: Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"DEPLOYING"}.

Per https://github.com/aws-amplify/amplify-hosting/issues/2582, I deleted team-provider-info.json in the s3 deployment bucket and tried amplify push again. And I got...

["Index: 0 State: {"deploy":"deploying"} Message: Parameters: [unauthRoleName, OpenSearchEBSVolumeGB, OpenSearchStreamBatchSize, OpenSearchAccessIAMRoleName, OpenSearchStreamingLambdaHandlerName, OpenSearchStreamMaximumBatchingWindowInSeconds, OpenSearchInstanceCount, OpenSearchInstanceType, OpenSearchDebugStreamingLambda, OpenSearchStreamingIAMRoleName, OpenSearchStreamingFunctionName, OpenSearchStreamingLambdaRuntime] do not exist in the template"]

Expected behavior

I would expect it would successfully push.

Reproduction steps

See details.

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

LeoReubelt avatar Jul 24 '23 14:07 LeoReubelt

Hey @LeoReubelt, thank you for reaching out. Just to confirm was the team-provider-info.json removed from you local application or the deployment-state.json file as indicated in the issue provided removed from the S3 bucket? As Amplify CLI does not store the team-provider-info.json the S3 deployment bucket.

team-provider-info.json is a the file used to share project info within your team and allows the ability to push or pull resources. if the team-provider-info.json was indeed removed could you add the file back in and retry the push.

ykethan avatar Jul 24 '23 17:07 ykethan

Yes @ykethan, my mistake. I removed the deployment-state.json file. Thank you for your response.

LeoReubelt avatar Jul 24 '23 17:07 LeoReubelt

Hey @LeoReubelt, could you try running amplify env checkout <current-env-name>, then run amplify push. this should update your amplify-meta.json. Do let us know if this does not mitigate the issue.

ykethan avatar Jul 24 '23 18:07 ykethan

@ykethan Thanks for the response. I tried that. It worked last time I had this problem. But not this time.

LeoReubelt avatar Jul 25 '23 13:07 LeoReubelt

Hey @LeoReubelt, could you share us the projects team-provider-info.json and amplify-meta.json files via email at [email protected] this would enable us in diving deeper into the issue.

ykethan avatar Jul 25 '23 18:07 ykethan

@ykethan - I have sent you the files. We have since abandoned the environment and created a new one. But we are trying to merge in many updates, including a migration to the v2 transformer and a custom resource. The custom resource requires a push from the cli to deploy. Some of the environments that we are trying to update work correctly, others result in the error listed at the top of the issue. ["Index: 0 State: {\"deploy\":\"deploying\"} Message: Parameters: [unauthRoleName, OpenSearchEBSVolumeGB, OpenSearchStreamBatchSize, OpenSearchAccessIAMRoleName, OpenSearchStreamingLambdaHandlerName, OpenSearchStreamMaximumBatchingWindowInSeconds, OpenSearchInstanceCount, OpenSearchInstanceType, OpenSearchDebugStreamingLambda, OpenSearchStreamingIAMRoleName, OpenSearchStreamingFunctionName, OpenSearchStreamingLambdaRuntime] do not exist in the template"].

LeoReubelt avatar Aug 03 '23 19:08 LeoReubelt

Hey @LeoReubelt, thank you for the information. On diving into the files I was unable to find any inconsistencies. The issue appears due to the migration from V1 to V2 with the OpenSearch enabled. I am going to transfer this to our API repository for further investigation.

ykethan avatar Aug 04 '23 16:08 ykethan