Skip to content

Fail provider DB test jobs when their tests fail - #74172

Merged
shahar1 merged 2 commits into
apache:mainfrom
zozo123:ci/providers-db-failures-fail
Oct 4, 2026
Merged

shahar1 merged 2 commits into
apache:mainfrom
zozo123:ci/providers-db-failures-fail

Conversation

@zozo123

@zozo123 zozo123 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Make provider DB test jobs fail when a test fails instead of treating exit code 1 from the parallel Breeze runner as “no DB tests were collected”.

The empty-selection case is identified at the individual test-type boundary, where pytest returns exit code 5. Only that code is treated as success when --run-db-tests-only is active. All other non-zero test, worker, compose, and timeout results remain failures.

Why this matters

A scan of 79 scheduled canary runs on main found 29 provider DB jobs that reported real test failures as successful. This change closes that false-green path while preserving legitimate test types with no DB tests.

Validation and measures

  • Breeze argument tests: 17 passed.
  • CI script tests: 2 passed.
  • Full Breeze test suite: 1,211 passed; three pre-existing failures in test_publish_docs_to_s3.py reproduce without this change.
  • Added regression coverage for failures, empty DB selections, worker/compose errors, and timeouts.
  • The expected outcome is fewer false-green provider DB jobs, with no test pruning or intended runtime change.

The change applies consistently to core and provider DB-only runs. It preserves exit code 2 for timeouts and passes through all other failure codes.

Scope

This PR changes result classification only. It does not reduce test coverage, alter test selection, or change dependency/image caching.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5.5)

Generated-by: Claude Code (Opus 5.5) following the guidelines

zozo123 and others added 2 commits October 4, 2026 04:56
run_unit_tests.sh read exit code 1 from the provider DB test run as "no
DB tests were collected" and passed the job. A parallel breeze run exits
1 whenever any test type fails, so failing provider DB tests have been
reported green; only a timeout (exit 2) still failed the job. Core DB
jobs never had the exception.

A test type without DB tests is still not a failure: pytest exits 5 once
--run-db-tests-only has deselected all of its tests. That can only be
recognised per test type, before the parallel run folds every return
code into 1, so breeze now decides it there.
Only an empty DB test selection may be normalized to success; test failures and process failures must retain their return codes.
@zozo123
zozo123 force-pushed the ci/providers-db-failures-fail branch from 783ca0b to 388abad Compare October 4, 2026 04:58

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great catch!

cc: @dabla

@shahar1
shahar1 merged commit 07c9ceb into apache:main Oct 4, 2026
157 checks passed
@zozo123
zozo123 deleted the ci/providers-db-failures-fail branch October 4, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants