Github status report CI success too early and provide invalide status response

Hello

I am checking on every Github webhook commit status changes that we have, to valid a global commit status using Github API.

The issue is, CircleCI doesn’t communicate all steps fast enough. So I report early that all steps are succeeded because not all of them are reported to the Github API.

There is a bug on Github side between frontend and API. The API reporting is late by 30s-1min. But still the first reporting of steps do no include every steps planned, and that’s the main issue.

Example for a build, every line bellow is a call I make to the Github API because I recevied a status update for a commit via webhook and want to check the overall:

  • task 1 running and task 2 waiting for 1 on circleci : Github API will report only one “CircleCI is running your tests”
  • task 1 success AND 2 is running on circleci : Github API will report only one “Your tests passed on CircleCI!” and a global success, not mention about running task.
  • task 1 success AND 2 is running on circleci : Now time pass and Github see the second running steps, even if it should be in pending/blocking state since the begining

My issue is there is difference between CircleCI jobs output and the one Github see. Something maybe link to how CircleCI speaks with Github commit status API.