Skip to content

test(ci): fix the e2e and integration reds left on rc/1.103.0 - #43391

Merged
yuneng-berri merged 1 commit into
rc/1.103.0from
litellm_rc_1_103_0_fix_ci_reds_2
Sep 27, 2026
Merged

yuneng-berri merged 1 commit into
rc/1.103.0from
litellm_rc_1_103_0_fix_ci_reds_2

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Buildkite e2e build 312 on rc/1.103.0 crashed mid-run with No module named 'batch_cleanup'
  • CircleCI integration-extensions fails all 23 OTel conversation id tests at setup

How it solves it:

  • The batch cleanup leftover warning is now a plain UserWarning
  • The integration harness gains the workers option and Gateway.request(headers=...), as main has them
  • Test files only, no product code

Relevant issues

Follow-up to #43382 and #43388

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

The leftover warning class lived in tests/e2e/batches/batch_cleanup.py. When a batch was still cancelling at teardown, the warning went uncaught on an xdist worker and the controller tried to import that module to rebuild it. The controller cannot import from the batches directory, so pytest exited 3 and the attempt could not be certified. A throwaway test that emits the warning without catching it, run as pytest . -k <it> -n 2 from tests/e2e, reproduces the same INTERNALERROR and exit 3 on the rc tip, and passes with exit 0 on this branch. test_batch_cleanup.py passes (50 tests)

#43382 carried over owned_proxy_process but not its workers option, and the OTel test also passes headers to Gateway.request, which rc lacked. CircleCI run 90555 on the rc tip failed every test in test_otel_conversation_id.py with owned_proxy_process() got an unexpected keyword argument 'workers'. The OTel tests collect here but have not run end to end locally, since they need the CircleCI database and Redis

Type

✅ Test

Caveats (if any)

Medium

Low

  • Tests can no longer tell leftover warnings apart by class, so they match on the message text instead

…43382 and #43388

The batch cleanup leftover warning used a class defined in a test-directory module. The xdist controller cannot import it, so an uncaught leftover warning crashed the whole e2e run. It is now a plain UserWarning.

The integration harness backport missed the workers option and Gateway.request headers that the OTel conversation id tests use.
@yuneng-berri
yuneng-berri merged commit 4dbbe6e into rc/1.103.0 Sep 27, 2026
5 of 46 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_rc_1_103_0_fix_ci_reds_2 branch September 27, 2026 00:54
@greptile-apps

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Low risk] Test and test-support code fixes for CI failures.

The PR appears safe to merge, though an uncaught-warning xdist regression test would protect the CI fix

Findings

  1. P2 Uncaught warning path remains untested ▶

Summary

The PR replaces a custom batch-cleanup warning with UserWarning and adds header and worker options to integration test helpers.

  • The warning change addresses the reported xdist import failure, but the updated tests do not exercise an uncaught warning crossing the worker boundary
  • Existing OTel fixtures use the newly supported helper options

Reviews (1) · Last reviewed commit: "test(ci): fix the e2e and integration re..."

manager.defer(lambda: cleanup_file(client, MANAGED_FILE_ID, key=key))
manager.defer(lambda: cleanup_batch(client, MANAGED_BATCH_ID, key=key, clock=ticks))
with pytest.warns(BatchCleanupLeftover) as leftovers:
with pytest.warns(UserWarning, match="^Left ") as leftovers:

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.

P2 Uncaught warning path remains untested Both updated tests catch cleanup warnings in-process. Neither checks that an uncaught warning reaches the pytest controller under xdist, so the reported CI crash could return while these tests stay green. A focused xdist regression test would cover that path

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

yuneng-berri added a commit that referenced this pull request Sep 27, 2026
)

The leftover warning used a class defined in a test-directory module. The xdist controller cannot import it, so an uncaught leftover warning crashed the whole e2e run. Same change as #43391 on rc/1.103.0
tin-berri pushed a commit that referenced this pull request Sep 27, 2026
)

The leftover warning used a class defined in a test-directory module. The xdist controller cannot import it, so an uncaught leftover warning crashed the whole e2e run. Same change as #43391 on rc/1.103.0

This branch is waiting to be deployed

1 waiting deployment
e2e-changed — ea2e086e Waiting Sep 27, 2026 by yuneng-berri via Run changed e2e tests against the stage-mirror stack #13194
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant