Skip to content

Commit 1e1626a

Browse files
authored
chore: add a job that check that all other jobs are green on PR (#13217)
## Changes * Enable Green CI Policy on dd-trace-py * on label change, some check can become green -> exclude change log check, as it's already required * on PR check list, some PR can become green -> exclude checklist check, as it's already required * concurrency This does not enforce checks on gitlab, for those, the required check on `dd-gitlab/default-pipeline` do the trick (eventually completed by other if needed). ## Change Added a job that verify the status of other jobs on the PR: * If one of those jobs is pending, running or failed, this job fails. * Once all jobs are finished in success, it succeed. The next step, once we've validated it works correctly, is to make this job a requirement for merges. Side note, this solution has been [implemented](https://github.com/DataDog/dd-trace-js/blob/master/.github/workflows/all-green.yml) successfully on DataDog/dd-trace-js for one year. I've removed `Bootstrap import analysis` from this check because it 20 PR has been merged with this job failing over the 195 PR on the last 60 days (success rate of 88%). Once this job is considered as healthy (or if we want to enforce it) we can remove it. There are other jobs with a bad success rate, but they are not often included in PR, so TBD. Here are the jobs with a success rate lower than 95% : * 95% (104) test * 95% (187) dd-gitlab/check_pipeline_status * 93% (30) dd-gitlab/contrib::dd_trace_api 1/4 * 93% (30) dd-gitlab/contrib::dd_trace_api 2/4 * 93% (30) dd-gitlab/contrib::dd_trace_api 3/4 * 93% (30) dd-gitlab/contrib::dd_trace_api 4/4 * 92% (200) dd-gitlab/default-pipeline * 88% (195) Bootstrap import analysis * 62% (8) dd-gitlab/contrib::dd_trace_api 1/1 * 0% (9) CircleCI Pipeline ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent 1cd1e73 commit 1e1626a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/all-green.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: All Green
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
all-green:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
checks: read
17+
contents: read
18+
steps:
19+
- uses: wechuli/allcheckspassed@e22f45a4f25f4cf821d1273705ac233355400db1
20+
with:
21+
delay: 10 # wait for this delay before starting
22+
polling_interval: 1 # after a failure, how long do it wait before checking again
23+
retries: 60 # how many retries before stopping
24+
checks_exclude: 'Bootstrap import analysis,require-checklist,Validate changelog'
25+
26+
# Why some checks are excluded?
27+
#
28+
# - Bootstrap import analysis: TO BE ADDED (Success rate of 88% as of 2025-04-17)
29+
# - require-checklist: this job is triggered by a change on PR description, and already explcititly required
30+
# - Validate changelog: this job is triggered by a change on labels, and already explcititly required

0 commit comments

Comments
 (0)