CircleCI Parallelism consolidated notification

Hello There,
We are working on improvising the total test execution time with the help of parallelism feature available in circle ci. We have implemented the parallelism with 3 and we are successfully able to split the test across all the available machines. So far good no issues.

The problem we are facing is on the consolidated build Notification. Before implementing the parallelism, at the end of steps we have a run step to send the build status notification in email and chat.

when running in parallel, we are getting notification for all the three machines which we thought of improvising. Kindly suggest a way to handle this. Below are the job and workflow sample we used

The requirement is, need to send consolidated notification based on all the 3 machine test run results.

Jobs:
Sanity-suite:
docker:
- image: circleci/node:12
working_directory: ~/repo
parallelism: 3
steps:
- cache-repo
- dependency-cache
- create-env-vars:
secret_name: “projectspecific variables”
- run:
name: Run Sanity Tests
command: |
FILEPATH=$(circleci tests glob ‘project_specific_path’ | circleci tests split --split-by=timings)
npm run tests
- notify-google-chat

workflows:
sanity-and-functional:
jobs:
- hold-sanity-suite:
type: approval
- sanity-suite:
context: running the endtoend test here
requires:
- hold-sanity-suite

1 Like

In the current state, there is not a simple means to only send a single message for parallel jobs.

We have a support article that describes a workaround to send that at the end of the workflow as opposed to at the end of each job. Essentially, you’ll only send on fail in the parallel jobs but then send on success on a follow-up job if there were no failures:

There is also a feature request that is fairly popular that discusses running a job even when the previous job failed:
https://ideas.circleci.com/cloud-feature-requests/p/always-run-a-job-even-when-dependent-jobs-failed

I would strongly encourage you to place a vote for that if you have not already as this would provide for a much cleaner solution.