mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-17 04:48:20 +00:00
62dca9e977
* fix(ci): flag codecov uploads and enable carryforward Coverage uploads from GHA and CircleCI were unflagged. Commits that receive the push-triggered workflows more than once (re-runs, or branches cut at the same SHA) accumulated many overlapping flagless sessions, and Codecov's per-commit merge dropped the largest, ubiquitously-imported files (router.py, proxy_server.py, main.py, utils.py, cost_calculator.py) from the report even though the uploaded XMLs contained them. - codecov.yaml: flag_management.default_rules.carryforward: true - GHA reusable bases: tag each upload with its workflow/shard name - CircleCI: tag the combined upload "circleci"; also combine the agent / google_generate_content_endpoint / litellm_utils datafiles that were produced and required but missing from the combine list * fix(ci): close coverage gaps in proxy-legacy, router-unit, auth-ui, caching-redis - test-unit-proxy-legacy: route through _test-unit-base so the full proxy_unit_tests suite (incl. comprehensive test_proxy_server*.py) is measured and uploaded with per-group flags (was plain pytest, no --cov) - _test-unit-services-base: declare the enable-redis input + the six secrets test-unit-caching-redis passes; that workflow had a workflow_call signature mismatch and startup_failed on every push (never ran). Changes are additive/optional - proxy-db and security callers unchanged - circleci: add --cov + persist + combine + upload-coverage requires for litellm_router_unit_testing (tests/router_unit_tests) and auth_ui_unit_tests (tests/proxy_admin_ui_tests); neither was covered anywhere. Redundant -k subset jobs left as-is (local_testing covers them) * fix(ci): remove dead GHA Redis workflow; keep Redis on CircleCI only CircleCI redis_caching_unit_tests already runs the exact same files (tests/local_testing/test_dual_cache.py, test_redis_batch_optimizations.py, test_router_utils.py) with --cov, and that datafile is already combined and uploaded. The GHA test-unit-caching-redis workflow was redundant and had never run (workflow_call signature mismatch -> startup_failure on every push). - Delete .github/workflows/test-unit-caching-redis.yml - Revert _test-unit-services-base.yml to the flag-fix state (drop the enable-redis input / secrets / env wiring added only to prop up the GHA Redis workflow); the verified per-upload flags line is kept - The only single-star "litellm_*" branch glob lived in the deleted file; no other single-star globs exist, so none remain to widen * fix(ci): keep proxy-legacy as a standalone job to preserve required check names Routing proxy-legacy through the reusable workflow renamed each check from the bare matrix name (e.g. "proxy-response-and-misc") to "proxy-response-and-misc / Run tests". Those bare names are required status checks in branch protection, so the old contexts never reported and PRs sat "Expected — Waiting for status to be reported" indefinitely. Restore the original standalone matrix job (job name == matrix name, so the required contexts report again) and add coverage in place: --cov on pytest plus an OIDC Codecov upload flagged proxy-legacy-<group>. Net effect of the gap-#2 fix is preserved (flagged coverage for tests/proxy_unit_tests/**) without changing any check name. * revert(ci): drop all proxy-legacy changes from this PR tests/proxy_unit_tests/** is already fully covered by test-unit-proxy-db (its shard-coverage guard fails CI if any file in that dir is unassigned), which this PR already flags + carryforwards. Adding --cov and id-token:write to the legacy pull_request job was redundant and put OIDC on a job that runs untrusted PR code. Restore the file to the base version verbatim so this PR no longer touches proxy-legacy at all (also restores its original required check names). Retiring proxy-legacy in favor of proxy-db on pull_request is a separate effort that needs a branch-protection change.
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
codecov:
|
|
require_ci_to_pass: false # post coverage status even if CI has unrelated failures
|
|
notify:
|
|
wait_for_ci: false # post as soon as expected uploads arrive, don't wait on CI
|
|
|
|
# Uploads are flagged per workflow/shard (GHA) or "circleci". carryforward makes
|
|
# a re-upload of a flag replace its prior session instead of accumulating a
|
|
# conflicting one, and lets a commit reuse a flag from its parent when that flag
|
|
# was not re-uploaded. Required because the same commit can receive the
|
|
# push-triggered workflows more than once (re-runs / branches cut at the same
|
|
# SHA); flagless overlapping sessions made Codecov drop the largest files.
|
|
flag_management:
|
|
default_rules:
|
|
carryforward: true
|
|
|
|
component_management:
|
|
individual_components:
|
|
- component_id: "Router"
|
|
paths:
|
|
- "router"
|
|
- component_id: "LLMs"
|
|
paths:
|
|
- "*/llms/*"
|
|
- component_id: "Caching"
|
|
paths:
|
|
- "*/caching/*"
|
|
- ".*redis.*"
|
|
- component_id: "litellm_logging"
|
|
paths:
|
|
- "*/integrations/*"
|
|
- ".*litellm_logging.*"
|
|
- component_id: "Proxy_Authentication"
|
|
paths:
|
|
- "*/proxy/auth/**"
|
|
- component_id: "Enterprise"
|
|
paths:
|
|
- "enterprise/**"
|
|
comment:
|
|
layout: "header, diff, flags, components" # show component info in the PR comment
|
|
|
|
coverage:
|
|
status:
|
|
project:
|
|
default:
|
|
target: auto
|
|
threshold: 0% # do not allow project coverage to drop
|
|
patch:
|
|
default:
|
|
target: auto
|
|
threshold: 0% # patch coverage should be 100%
|