Skip to content
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

Ensure "complete" CI steps always run #4506

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Ensure "complete" CI steps always run #4506

wants to merge 3 commits into from

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Mar 17, 2025

This PR ensures the last step of our CI workflows (normally called WORKFLOW NAME (complete)) always run, even when its dependency jobs have failed or been skipped.

This ensures that our mandatory branch protection checks will never be skipped by GitHub. Today when the "complete" job is skipped, the branch protection check considers it successful

Change log entry
No

Additional Notes:

How to test the change?

@marcotc marcotc added the dev/github Github repository maintenance and automation label Mar 17, 2025
@marcotc marcotc self-assigned this Mar 17, 2025
@marcotc marcotc requested a review from a team as a code owner March 17, 2025 19:15
@marcotc marcotc marked this pull request as draft March 17, 2025 19:25
@p-datadog
Copy link
Member

LGTM but I don't understand the GH stuff enough to checkmark

@pr-commenter
Copy link

pr-commenter bot commented Mar 17, 2025

Benchmarks

Benchmark execution time: 2025-03-18 08:32:12

Comparing candidate commit 4db2cc1 in PR branch fix-checks with baseline commit 874e602 in branch master.

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

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.69%. Comparing base (874e602) to head (4db2cc1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4506      +/-   ##
==========================================
- Coverage   97.70%   97.69%   -0.02%     
==========================================
  Files        1381     1381              
  Lines       83973    83973              
  Branches     4251     4251              
==========================================
- Hits        82046    82036      -10     
- Misses       1927     1937      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Mar 17, 2025

Datadog Report

Branch report: fix-checks
Commit report: 4db2cc1
Test service: dd-trace-rb

✅ 0 Failed, 20632 Passed, 1370 Skipped, 3m 17.78s Total Time

@marcotc marcotc marked this pull request as ready for review March 17, 2025 20:23
Copy link
Member

@lloeki lloeki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today when the "complete" job is skipped, the branch protection check considers it successful ‽

This is normal (and similar to rspec skipping tests?)

In GHA terms, "skipped" means "this step/workflow is not relevant".

e.g running system tests for doc changes makes no sense => skipped, ergo "successful".

This PR would transform a "skipped" UI display materialising the fact that the tests did not run (intentionally so) into a checkmark that looks like as if the tests did run when they actually didn't.

(Again, a skipped test is displayed differently than a passing one in a rspec suite)

even when its dependency jobs have failed

Also "(complete)" should not run when any dependent fail and thus properly result in the PR tests not passing / the PR being unmergeable. Is that the initial reason for this PR? That you'd like it to be red?

Marking this "request changes" to leave the opportunity to discuss, but I don't believe the change should be merged.

See:

@p-datadog
Copy link
Member

@lloeki My reading of the diff is that a skipped status would be changed to failing, not successful, thus there will not actually be a case when a skipped test would be marked as having been run and succeeded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev/github Github repository maintenance and automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants