Repository navigation
test(ci): fix the e2e and integration reds left on rc/1.103.0 - #43391
Conversation
…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.
|
| 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: |
There was a problem hiding this comment.
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!
) 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
) 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
TLDR
Problem this solves:
No module named 'batch_cleanup'integration-extensionsfails all 23 OTel conversation id tests at setupHow it solves it:
UserWarningworkersoption andGateway.request(headers=...), as main has themRelevant issues
Follow-up to #43382 and #43388
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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@greptileaito 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 aspytest . -k <it> -n 2fromtests/e2e, reproduces the sameINTERNALERRORand exit 3 on the rc tip, and passes with exit 0 on this branch.test_batch_cleanup.pypasses (50 tests)#43382 carried over
owned_proxy_processbut not itsworkersoption, and the OTel test also passesheaderstoGateway.request, which rc lacked. CircleCI run 90555 on the rc tip failed every test intest_otel_conversation_id.pywithowned_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 RedisType
✅ Test
Caveats (if any)
Medium
Low