AWS Amplify -- Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"} - aws-amplify-cli

Summary:
When attempting to amplify push changes to my graphql api via the Amplify CLI after aborting an amplify push (using ctrl-c) the cli complains that there is a deployment in progress and cannot deploy.
First error message:
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
Both of those suggested commands result in:
✖ An error occurred when pushing the resources to the cloud
Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"}
An error occurred during the push operation: Cannot iteratively rollback as the following step does not contain a previousMetaKey: {"status":"WAITING_FOR_DEPLOYMENT"}
All deployments in the Amplify Admin UI show as completed.
I tried amplify pull, amplify env pull, amplify pull --restore (all of which override your local changes - heads up). None worked to solve my problem. Still could not amplify push.
I finally found this idea: https://github.com/aws-amplify/amplify-adminui/issues/172#issuecomment-819784558
Solution
Deleting the deployment-state.json file as suggested in that reply allowed me to perform amplify push again. If you open it up you'll see that this is where the cli must be seeing the {"status":"WAITING_FOR_DEPLOYMENT"}
Sharing my solution here in case someone else has the same problem!

Solution
Deleting the deployment-state.json file as suggested in that reply allowed me to perform amplify push again. If you open it up you'll see that this is where the cli must be seeing the {"status":"WAITING_FOR_DEPLOYMENT"}.
Sharing my solution here in case someone else has the same problem!

Open the corresponding s3 bucket to the Amplify app.. usually begins with "Amplify-appname...." and delete the "deployment-state.json" file

Related

Unable to Publish Azure Data Factory Publish

I am trying to pulish an Azure Data Factory pipeline, however I'm getting the error:
Error The document creation or update failed because of invalid
reference 'master'. Please ensure 'master' exists in data factory mode
and recreate it in Git mode if already present.
I am familiar with the error. However, I'm can't find reference 'master'. Can someone let me know how to go about tracking down the reference 'master'?
Thanks
This issue is commonly caused by a mismatch between Data Factory mode and Git mode. It may happen when Git is first configured, or when changes are added directly in Git or in Live mode.
If you are unable to find and fix the conflict manually, you may re-sync the content in the Git Configuration page, by using either:
Overwrite Live Mode (which I recommend): Makes Data Factory mode (published) version match Git.
Import Resources: Makes a Git branch match Data Factory mode.
Git configuration page
Please be advised that overwriting live mode may result in losing changes not currently in Git. You may use Import Resources to persist changes prior to this.

AWS CodeBuild fails in DOWNLOAD_SOURCE phase using CODEBUILD_CLONE_REF

If I check the 'Build phase' tab of a CodeBuild project called from CodePipeline using CODEBUILD_CLONE_REF, I get the following error:
Internal Service Error: CodeBuild is experiencing issues
AWS support responded that this can be caused by having too many 'git refs' in the repo. At the time of this writing, CodeBuild uses a go-lang -based library for handling git and the library has a known limitation.
AWS support recommended switching to the CODE_ZIP method of passing code between the CodePipeline 'source' stage and the CodeBuild stage at issue.
We might also try to reduce the number of refs in the repo.

Gitlab-CI: AWS S3 deploy is failing

I am trying to create a deployment pipeline for Gitlab-CI on a react project. The build is working fine and I use artifacts to store the dist folder from my yarn build command. This is working fine as well.
The issue is regarding my deployment with command: aws s3 sync dist/'bucket-name'.
Expected: "Done in x seconds"
Actual:
error Command failed with exit code 2. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Running after_script 00:01 Uploading artifacts for failed job 00:01 ERROR: Job failed: exit code 1
The files seem to have been uploaded correctly to the S3 bucket, however I do not know why I get an error on the deployment job.
When I run the aws s3 sync dist/'bucket-name' locally everything works correctly.
Check out AWS CLI Return Codes
2 -- The meaning of this return code depends on the command being run.
The primary meaning is that the command entered on the command line failed to be parsed. Parsing failures can be caused by, but are not limited to, missing any required subcommands or arguments or using any unknown commands or arguments. Note that this return code meaning is applicable to all CLI commands.
The other meaning is only applicable to s3 commands. It can mean at least one or more files marked for transfer were skipped during the transfer process. However, all other files marked for transfer were successfully transferred. Files that are skipped during the transfer process include: files that do not exist, files that are character special devices, block special device, FIFO's, or sockets, and files that the user cannot read from.
The second paragraph might explain what's happening.
There is no yarn build command. See https://classic.yarnpkg.com/en/docs/cli/run
As Anton mentioned, the second paragraph of his answer was the problem. The solution to the problem was removing special characters from a couple SVGs. I suspect uploading the dist folder as an artifact(zip) might have changed some of the file names altogether which was confusing to S3. By removing ® and + from the filename the issue was resolved.

invalid pkt-len - AWS CodeBuild failing on DOWNLOAD_SOURCE from CodeCommit

I am running this error during the "DOWNLOAD_SOURCE" phase in CodeBuild:
"invalid pkt-len found"
No other information is provided. I have tried various things to rule out problems.
a) The CodeCommit repo clones successfully, and appears to be fully functional.
b) Building from an earlier revision on this CodeCommit repository that had previously built successfully now throw this error -- Fails with same error message
b) Building from a separate CodeCommit repository with a separate CodeBuild project that has previously built successfully AND has no new commits -- Fails with same error
c) A brand new CodeBuild project and CodeCommit repo -- Does not fail
d) Building the same CodeBuild job that fails, with a zip file (of the same code base) as source instead of CodeCommit, and it does not fail.
I was getting the same error in Codebuild. Turned out, I was using a URL of a sub-folder in the repository. Since it was not a proper Git repo URL, it was throwing an invalid pkt len error. I hope this helps somebody who stumbles onto the same error.
Got a response from AWS - this was an issue on their end, which they have resolved.

how to troubleshoot AOSP make failure src not found error

I have read some of the content on Android source, and my goal is to build an image for the Note III from Sprint. My make fails with the following message at the top: "find: `src': No such file or directory". I started a script session of my make process, so if there is any other information I can provide, please let me know. I tried to download jb-mr1-dev-plus-aosp branch for my device, and tried to build the full_toroplus-eng image. I think I have all the source from this branch. But I know very little about what I have. How do I validate my repo sync went smoothly? I get the following error at the end of my repo sync session:
9/platforms/android-12/arch-arm/usr/include/asm-generic/emergency-restart.h
9/platforms/android-12/arch-arm/usr/include/asm-generic/errno-
Aborting
Syncing work tree: 100% (348/348), done.
prebuilts/ndk/: discarding 93 commits
error: prebuilts/ndk/: platform/prebuilts/ndk checkout 9283a93c7b03896d32a8e88c9322c827d4303652
root#ubuntu:~/WORKING_DIRECTORY#
How do I find out more about this? How do I troubleshoot it?
I think I have all the source from this branch. But I know very little about what I have. How do I validate my repo sync went smoothly?
If Repo terminated with a zero exit code you're good to go.
I get the following error at the end of my repo sync session:
prebuilts/ndk/: discarding 93 commits
error: prebuilts/ndk/: platform/prebuilts/ndk checkout 9283a93c7b03896d32a8e88c9322c827d4303652
If memory serves me right, this means that the prebuilts/ndk directory is dirty (i.e. contains modified files) and thus prevents checking out a new commit. Running git status will tell you what's up.