aws-amplify / amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
https://aws.amazon.com/amplify/hosting/
Apache License 2.0
456 stars 115 forks source link

CD isn't working reliable #1526

Closed chkrause closed 3 years ago

chkrause commented 3 years ago

Since 28th of January we facing issues with the configured CD via Code-Commit.

After committing a change the amplify deployment isn't triggered any longer.

Steps to reproduce:

  1. Connect Branch via Code-Commit (Mono-Repository) => Deployment runs sucessfull image

  2. Commit change to code-commit => Deployment is triggered, layout has changed, but deyployment seems be be fine image a. Trigger Event from CodeCommit to SNS Topic “amplify_codecommit_topic

    {
                "Records": [
                                {
                                                "awsRegion": "eu-central-1",
                                                "codecommit": {
                                                                "references": [
                                                                                {
                                                                                                "commit": "a3125a399a30635e9204c6b8241d07ce046e14e9",
                                                                                                "ref": "refs/heads/master"
                                                                                }
                                                                ]
                                                },
                                                "customData": "xxxxxxxxx",
                                                "eventId": "569aae6e-1934-4f9c-a54a-36eb1f8a18e9",
                                                "eventName": "ReferenceChanges",
                                                "eventPartNumber": 1,
                                                "eventSource": "aws:codecommit",
                                                "eventSourceARN": "arn:aws:codecommit:eu-central-1:xxxxxxxxxx:xxxxxxxxxBook",
                                                "eventTime": "2021-02-01T19:45:08.963+0000",
                                                "eventTotalParts": 1,
                                                "eventTriggerConfigId": "76c1da5d-2dcb-4688-97ac-9d70ab2e88c9",
                                                "eventTriggerName": "AmplifyTrigger-xxxxxxxxx",
                                                "eventVersion": "1.0",
                                                "userIdentityARN": "arn:aws:iam::xxxxxxxxxx:user/xxx"
                                }
                ]
    }
  3. Any additional change to code-commit will not trigger new deployments a. Trigger Event from CodeCommit to SNS Topic “amplify_codecommit_topic

    {
                "Records": [
                                {
                                                "awsRegion": "eu-central-1",
                                                "codecommit": {
                                                                "references": [
                                                                                {
                                                                                                "commit": "d863984ba212dd0be0b10306264d036597504e15",
                                                                                                "ref": "refs/heads/master"
                                                                                }
                                                                ]
                                                },
                                                "customData": "xxxxxxxxx",
                                                "eventId": "d59f1c77-a931-439b-9b7d-3fedde52da97",
                                                "eventName": "ReferenceChanges",
                                                "eventPartNumber": 1,
                                                "eventSource": "aws:codecommit",
                                                "eventSourceARN": "arn:aws:codecommit:eu-central-1:xxxxxxxxxx:xxxxxxxxxBook",
                                                "eventTime": "2021-02-01T19:59:28.348+0000",
                                                "eventTotalParts": 1,
                                                "eventTriggerConfigId": "76c1da5d-2dcb-4688-97ac-9d70ab2e88c9",
                                                "eventTriggerName": "AmplifyTrigger-xxxxxxxxx",
                                                "eventVersion": "1.0",
                                                "userIdentityARN": "arn:aws:iam::xxxxxxxxxx:user/xxx"
                                }
                ]
    }

    b. Build-History is broken and dosn't display anything c. Deployment Logs only avilable by manipulation of URL

lavigne commented 3 years ago

We are facing the exact same issue. Auto deploy was working fine for months until a few days ago. It appears it may be an issue with Amplify's subscription to the SNS topic. I've added a second subscription to the topic that sends me an email and I can see that CodeCommit is indeed dropping a message on the SNS topic because I receive an email when I push a commit, but Amplify doesn't run the auto build/deploy. I've also added a webhook to manually deploy and this works fine. The behavior I see is that if I run a manual deploy via the webhook, then the very next auto deploy will run successfully. I see the same odd layout changes in the UI mentioned by @chkrause where it shows the green "deployment successfully completed" progress bar rather than the provision/build/test/deploy/verify steps. After that successful build, subsequent code commit changes will not trigger an auto deploy. We get the same behavior if we disconnect the branch and then re-connect it. The first commit will trigger an auto deploy but subsequent ones do not. We have all the exact symptoms described by @chkrause such as empty build history, no deployment logs, etc.

ganipcanot commented 3 years ago

Resolving due to age - please re-open if you are still experiencing issues.

github-actions[bot] commented 1 year ago

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