dd-trace-php icon indicating copy to clipboard operation
dd-trace-php copied to clipboard

add a job that check all other job status

Open cbeauchesne opened this issue 6 months ago • 3 comments

Description

Add a job in the CI that runs in PR. The job will be a success if all other jobs are skipped/success, and fails otherwise

Motivation

While it's possible to enforce a green CI policy using GitHub's native "required status checks" feature, doing so requires explicitly listing all job names under branch protection rules. This approach has two key drawbacks:

  • It does not support optional jobs
  • It introduces ongoing maintenance overhead as the job list evolves

This jobs will check ALL other job, and we'll be able to set this as a requirement. The action used offers a ignored-name-patterns parameters`, I added few job that failed on that PR, let me know if others should be added.

the plan is to merge this PR, wait few days to be sure that everything is fine. Then add it as a requirement.

Reviewer checklist

  • [ ] Test coverage seems ok.
  • [ ] Appropriate labels assigned.

cbeauchesne avatar May 05 '25 10:05 cbeauchesne

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 71.41%. Comparing base (0697a7f) to head (2f10573). :warning: Report is 225 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3230   +/-   ##
=========================================
  Coverage     71.41%   71.41%           
  Complexity     2948     2948           
=========================================
  Files           118      118           
  Lines         11633    11633           
=========================================
  Hits           8308     8308           
  Misses         3325     3325           
Flag Coverage Δ
tracer-php 71.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0697a7f...2f10573. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar May 05 '25 10:05 codecov-commenter

Hi @bwoebi ,

ignored-name-patterns is a list of pattern (regex), so it's quite easy to ignore entirely gitlab by using gitlab/.*.

At least, other jobs will be in required list. My point is that if we wait to have enough healthy jobs to move forward, we'll probably never move forward, as some jobs may become unhealthy while we're fixing other.

I totally understand the burden of maintaining a big list, that's why I used regexes for this parameters, please let me know if it can be a good fit.

cbeauchesne avatar May 05 '25 19:05 cbeauchesne

@cbeauchesne This is pointless though as within two weeks all ci/circleci will disappear, leaving this check effectively checking nothing then. I'd rather consider this PR when the time comes to do it properly.

It's not "wait for enough healthy jobs", but "let's merge gitlab and wait 1-2 weeks to see where it's actually unstable and then apply this".

bwoebi avatar May 05 '25 20:05 bwoebi