Container step shows 'Build was cancelled' and is a missing the green checkmark although all tests run and pass

I have integrated CircleCI into my app such that every branch that is pushed to Github gets tests run against it and can only be merged with master if all tests pass. It is working as expected but I observed some peculiar behaviour on viewing the steps on https://app.circleci.com/.

Given below are the relevant images and my configuration file demonstrating the issue.

Thanks for the help!

Container step shows ‘Build was cancelled’ and is a missing the green checkmark although all tests run and pass

config.yml

# JavaScript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:13.0.1
      - image: mongo:4.2.1

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mongo:3.4.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "package.json" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-

      - run: 
          name: Install Dependencies
          command: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      # run tests!
      - run:
          name: Run Tests
          command: jest --ci --runInBand --detectOpenHandles --forceExit
          environment:
            MONGODB_URL: mongodb://127.0.0.1:27017/app-name

Hi @philosopher,

That is weird. Does your tests actually require MongoDB to run? What does expanding the test job show?

Regards,
Stig

Hi Stig,

My tests pass as expected. I have multiple tests that require firing up a test database and adding and removing records from it.

Please see screensht showing that all tests passed:

Hi again! That is curious. I think your best bet is to file a support request so they can take a look, trace logs etc.

I have a similar issue with android emulator.
Step shows “Build was cancelled” with gray mark, but the entire workflow successes with green check.

My situation is very similar with below (Circle CI official repo of android testing example)
https://app.circleci.com/pipelines/github/CircleCI-Public/android-testing-circleci-examples/34/workflows/590a4399-1b46-45a4-8456-e65023713756/jobs/181

Is there anyone who can solve this issue?
Maybe it is known issue because official repo also shows this situation.

I want to see all green checks without gray icon.
(c.c @stig)

And one more thing.
Every time I ran command as “Background Job” (by giving background option “true”) and it also shows gray mark at the step when entire workflow ends.

And maybe this kind of problems are caused by this.
Background process goes on till the entire workflow ends and shows green at the end because that background process is down not by itself but by the system.

The entire workflow shows green, but that background step exited when the workflow ends shows a gray mark.

I already tried to kill this background process before the end of workflow, but when it makes another problem.
It shows red flag because that background job received “SIGTERM”.

Hi @denver.lee,

I’m not sure what’s going on here. Can you please contact support about this issue, and include links to your workflows? I’m sure they’ll be able to help.

Stig

Hi @stig
I already made support ticket and made a post about this problem here

Please check the post :slight_smile: I’d like to hear your opinion about this issue.

F.Y.I
And here is my support ticket link.
https://support.circleci.com/hc/en-us/requests/91550?page=1

1 Like