mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(ci): tell stale branches to pull latest staging on vacuous type-check runs
This commit is contained in:
parent
f6587faef5
commit
5741b26e0b
2 changed files with 13 additions and 1 deletions
|
|
@ -627,7 +627,9 @@ def cmd_check(head: Mapping[str, int], base_ref: str) -> None:
|
|||
print(
|
||||
f"FAIL: basedpyright produced no errors, but {BUDGET_PATH.name} allows "
|
||||
f"up to ~{expected}. The type checker almost certainly crashed or emitted "
|
||||
f"nothing; refusing to certify a vacuous run."
|
||||
f"nothing; refusing to certify a vacuous run. This usually means this "
|
||||
f"branch is missing type checker fixes from its base branch: pull the "
|
||||
f"latest {DEFAULT_BASE.removeprefix('origin/')} and merge or rebase onto it."
|
||||
)
|
||||
raise SystemExit(1)
|
||||
if not over_ceiling(head, budget):
|
||||
|
|
|
|||
|
|
@ -200,6 +200,16 @@ def test_genuine_zero_and_empty_budget_are_not_vacuous():
|
|||
)
|
||||
|
||||
|
||||
def test_vacuous_run_failure_tells_the_user_to_pull_latest_staging(capsys):
|
||||
import pytest
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
gate.cmd_check({}, gate.DEFAULT_BASE)
|
||||
out = capsys.readouterr().out
|
||||
assert "refusing to certify a vacuous run" in out
|
||||
assert "pull the latest litellm_internal_staging and merge or rebase onto it" in out
|
||||
|
||||
|
||||
def test_update_ratchets_a_limit_down_by_what_the_branch_fixed():
|
||||
# A rule that dropped from 40 (branch point) to 30 (current) fixed 10, so its
|
||||
# limit of 100 falls to 90 -- the granted headroom (60) is preserved, not the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue