Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1108 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 103 103
Lines 13506 13506
Branches 483 483
=======================================
Hits 12478 12478
Misses 1028 1028
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
That's definitely what we should be doing instead. If the "Build and test wheels" job is succeeding despite one of its dependencies failing (or being cancelled), that's the problem we should be fixing. The whole point of that job is to let us block PRs from merging if testing any of the wheels failed! |
The job always succeeded: in a step, success() only checks earlier steps of the same job, not the jobs in needs. So the required check passed even when wheel jobs failed, and a release with a failed wheel job would still publish to PyPI. Fail when any wheel job fails, is cancelled, or is skipped because a job before it failed. Signed-off-by: Kirill Ignatev <kignatev@bloomberg.net>
Problem
"Build and test wheels" succeeds even when wheel jobs fail. It is a
required check, so PRs can merge with failing wheel builds or tests. And
upload_pypionly waits for it, so a release with a failed wheel jobwould still publish to PyPI, just without that platform's wheels.
Context
#516 made
upload_pypidepend on "Build and test wheels" on purpose, sothat one job means "all wheels built and tested" for both the required
check and publishing. Back then, a failed wheel job made that job skip,
and
upload_pypiskipped with it.58adb86 (#670) made the job always run so that the required check could
fail. But its
if: "!success()"step only sees earlier steps of the samejob, not
needs, so the step never runs. The job always succeeds, andpublishing is no longer gated on the wheel jobs.
Changes
Fail the job when any wheel job failed, was cancelled, or was skipped.
The wheel jobs are only skipped when a job before them fails, such as
build_sdist.Alternative
Make
upload_pypidepend on the wheel jobs directly instead:That only fixes releases. The required check would keep passing, so PRs
could still merge while wheel jobs fail, but flaky wheel failures
wouldn't block them.