Skip to content

chore: add a job that check that all other jobs are green on PR #13217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cbeauchesne
Copy link
Contributor

@cbeauchesne cbeauchesne commented Apr 16, 2025

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 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

  • 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
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • 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 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

Copy link
Contributor

CODEOWNERS have been resolved as:

.github/workflows/all-green.yml                                         @DataDog/python-guild @DataDog/apm-core-python

Copy link
Contributor

github-actions bot commented Apr 16, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 243 ± 4 ms.

The average import time from base is: 247 ± 5 ms.

The import time difference between this PR and base is: -4.5 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.178 ms (0.90%)
ddtrace.bootstrap.sitecustomize 1.487 ms (0.61%)
ddtrace.bootstrap.preload 1.487 ms (0.61%)
ddtrace.internal.products 1.487 ms (0.61%)
ddtrace.internal.remoteconfig.client 0.688 ms (0.28%)
ddtrace 0.691 ms (0.28%)

@cbeauchesne cbeauchesne added the changelog/no-changelog A changelog entry is not required for this PR. label Apr 16, 2025
@pr-commenter
Copy link

pr-commenter bot commented Apr 16, 2025

Benchmarks

Benchmark execution time: 2025-04-17 14:50:11

Comparing candidate commit 7bff138 in PR branch cbeauchesne/green-ci-policy with baseline commit 002e5f9 in branch main.

Found 5 performance improvements and 2 performance regressions! Performance is the same for 491 metrics, 2 unstable metrics.

scenario:iast_aspects-format_map_aspect

  • 🟥 execution_time [+414.864ns; +512.523ns] or [+12.632%; +15.606%]

scenario:iast_aspects-upper_aspect

  • 🟥 execution_time [+170.143ns; +231.869ns] or [+7.525%; +10.255%]

scenario:otelspan-start-finish

  • 🟩 execution_time [-18.863ms; -18.499ms] or [-23.904%; -23.443%]

scenario:otelspan-start-finish-telemetry

  • 🟩 execution_time [-19.086ms; -18.571ms] or [-23.751%; -23.110%]

scenario:span-start-finish

  • 🟩 execution_time [-15.460ms; -14.968ms] or [-32.299%; -31.272%]

scenario:span-start-finish-telemetry

  • 🟩 execution_time [-15.932ms; -15.223ms] or [-32.335%; -30.895%]

scenario:span-start-finish-traceid128

  • 🟩 execution_time [-18.974ms; -18.337ms] or [-36.786%; -35.552%]

@cbeauchesne cbeauchesne marked this pull request as ready for review April 17, 2025 10:25
@cbeauchesne cbeauchesne requested review from a team as code owners April 17, 2025 10:26
@cbeauchesne cbeauchesne enabled auto-merge (squash) April 17, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants