aws-amplify / aws-amplify/amplify-hosting

Completed builds are showing an inaccurate status for build steps

Open
#1,047 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

**Issue Description**

In the amplify console, if you go to view older builds while another build is in progress, the status/results of those older builds appear to be different than they were at time of completion. For example, if there were tests that passed in an older build, they will show as pending while a build is in progress.

Old build that previously showed passing tests:
Screen Shot 2020-09-15 at 2 05 29 PM

Shows the current build runnning:
Screen Shot 2020-09-15 at 1 48 34 PM

Shows the old build with pending test status:
Screen Shot 2020-09-15 at 1 38 11 PM

**Detailed Steps To Reproduce**

Trigger a build with tests for a given environment.

While the above build is running, go to an older build that has already completed with passing tests.

Observe that for the previous build, the tests that were marked as passed are marked as Pending even though when you view the log for the Test step, it shows passing tests.

**Expected behavior**

Builds prior to the current one should always reflect their state when they were finished. It is very confusing to look at older builds while a current build is running and have indicators on the page that do not line up with what actually happened.

**Application Details**

a. Please share your Amplify Console AppID, found in App settings > General > App ARN (e.g. arn:aws:amplify:us-west-2:XXXXXXXXXXX:apps/APPID)

arn:aws:amplify:us-east-2:396136447318:apps/d2df4ylja65m9v

**If the issue is related to a build, please also share:**

**b. The specific Branch and Build number we should investigate**

The issue happens while a build is in progress and does not appear if builds for a given environment are not currently running.

**c. Your buildspec (the version at the time the issue occurred), either from the Amplify console or amplify.yml (Be sure to remove any sensitive data)**

`version: 0.1

backend:
phases:
build:
commands:
- amplifyPush --simple
postBuild:
commands:
- npm run enableAppSyncLogging

frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: build
files:
- "**/*"
cache:
paths:
- node_modules/**/*

test:
phases:
preTest:
commands:
- npm ci
- "npm start & npx wait-on http://localhost:3000"
test:
commands:
- "npm run e2e:amplify"
postTest:
commands:
- npx mochawesome-merge cypress/report/mochawesome-report/mochawesome*.json > cypress/report/mochawesome.json
artifacts:
baseDirectory: cypress
configFilePath: "**/mochawesome.json"
`

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the Amplify console by opening a completed build with passing tests while another build is running, using the supplied amplify.yml test configuration. Compare the historical build indicators with the Test-step log; done means completed builds retain their recorded test status and the indicators agree with their logs during later builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, cypress, javascript
Domain
ci-cd, cloud, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.