fix: integration tests#231
Conversation
|
Thanks for the pull request, @Henrrypg! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #231 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 69 69
Lines 8083 8086 +3
Branches 432 432
=======================================
+ Hits 7705 7708 +3
Misses 283 283
Partials 95 95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This looks reasonable, but now the question is does it fix the tests? what would be our standard for this? do we run it manually before we merge the branch? |
ac627dd to
2cc4b56
Compare
2cc4b56 to
04def07
Compare
|
/integration-test |
|
@Henrrypg they are indeed showing green, but there are some errors being logged: --- Logging error ---
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/async_client_cleanup.py", line 66, in cleanup_wrapper
loop = asyncio.get_event_loop()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/asyncio/events.py", line 702, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'MainThread'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/logging/__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/async_client_cleanup.py", line 76, in cleanup_wrapper
loop = asyncio.new_event_loop()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/asyncio/events.py", line 823, in new_event_loop
self._pool.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 353, in close
self._close_connections(closing_connections)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 345, in _close_connections
connection.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 172, in close
with Trace("close", logger, None, {}):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 64, in __exit__
self.trace(f"{self.name}.complete", info)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 47, in trace
self.logger.debug(message)
Message: 'close.complete'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/logging/__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 1119, in __del__
self.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 888, in close
self.client.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpx/_client.py", line 1270, in close
self._transport.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpx/_transports/default.py", line 262, in close
self._pool.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 353, in close
self._close_connections(closing_connections)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 345, in _close_connections
connection.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 172, in close
with Trace("close", logger, None, {}):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 52, in __enter__
self.trace(f"{self.name}.started", info)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 47, in trace
self.logger.debug(message)
Message: 'close.started'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/logging/__init__.py", line 1163, in emit
stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 1119, in __del__
self.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/litellm/llms/custom_httpx/http_handler.py", line 888, in close
self.client.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpx/_client.py", line 1270, in close
self._transport.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpx/_transports/default.py", line 262, in close
self._pool.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 353, in close
self._close_connections(closing_connections)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 345, in _close_connections
connection.close()
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 172, in close
with Trace("close", logger, None, {}):
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 64, in __exit__
self.trace(f"{self.name}.complete", info)
File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/httpcore/_trace.py", line 47, in trace
self.logger.debug(message)
Message: 'close.complete'
Arguments: ()Also, it would be great if running |
|
/integration-test |
|
@felipemontoya Done, i just made a change to not show those itellm logs and now we can see the check |
This PR fixes integration test by adding a default error message if LLM is trying to call unknown tool.