Skip to content

CI adjustments - #3270

Open
Dreamsorcerer wants to merge 2 commits into
mainfrom
sam/ci-tweaks
Open

CI adjustments#3270
Dreamsorcerer wants to merge 2 commits into
mainfrom
sam/ci-tweaks

Conversation

@Dreamsorcerer

Copy link
Copy Markdown
Collaborator

A few improvements which reduce test collection time by ~10 seconds.

Additionally, fixes the Python version matrix. It seems all our runs were testing Python 3.12 due to uv misconfiguration.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3441 1 3440 41
View the top 1 failed test(s) by shortest run time
dimos.protocol.pubsub.impl.webrtc.test_transport::test_broker_heartbeat_terminal_notifies_operator_lost
Stack Traces | 0.009s run time
def test_broker_heartbeat_terminal_notifies_operator_lost() -> None:
        """A revoked session (401/404 streak) may leave the WebRTC room up, so the
        planner would keep driving. The terminal branch must inject operator_lost
        before abandoning the heartbeat loop."""
        import asyncio
    
        provider = BrokerConfig(api_key="key")._create()
        provider._config = provider._config.model_copy(update={"heartbeat_hz": 1000.0})  # fast ticks
    
        got: list[bytes] = []
        provider._callbacks["state_reliable"] = [lambda data, topic: got.append(data)]
    
        async def _always_401() -> int:
            return 401
    
        provider._heartbeat_once = _always_401  # type: ignore[method-assign]
>       asyncio.run(asyncio.wait_for(provider._heartbeat_loop(), timeout=2.0))

_always_401 = <function test_broker_heartbeat_terminal_notifies_operator_lost.<locals>._always_401 at 0x7ff7bc4725c0>
asyncio    = <module 'asyncio' from '............/_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/__init__.py'>
got        = [b'{"type": "operator_lost"}']
provider   = <dimos.protocol.pubsub.impl.webrtc.providers.broker.BrokerProvider object at 0x7ff7bc49d6d0>

.../impl/webrtc/test_transport.py:447: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../.........../_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/runners.py:190: in run
    return runner.run(main)
        debug      = None
        main       = <coroutine object wait_for at 0x7ff7bc661580>
        runner     = <asyncio.runners.Runner object at 0x7ff7bc49d4d0>
../.........../_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/runners.py:118: in run
    return self._loop.run_until_complete(task)
        context    = <_contextvars.Context object at 0x7ff7bc722e40>
        coro       = <coroutine object wait_for at 0x7ff7bc661580>
        self       = <asyncio.runners.Runner object at 0x7ff7bc49d4d0>
        sigint_handler = functools.partial(<bound method Runner._on_sigint of <asyncio.runners.Runner object at 0x7ff7bc49d4d0>>, main_task=<Ta...ome/runner/work........./_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/tasks.py:436> result=None>)
        task       = <Task finished name='Task-159' coro=<wait_for() done, defined at ............/_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/tasks.py:436> result=None>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_UnixSelectorEventLoop running=False closed=True debug=False>
future = <Task finished name='Task-159' coro=<wait_for() done, defined at ............/_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/tasks.py:436> result=None>

    def run_until_complete(self, future):
        """Run until the Future is done.
    
        If the argument is a coroutine, it is wrapped in a Task.
    
        WARNING: It would be disastrous to call run_until_complete()
        with the same coroutine twice -- it would wrap it in two
        different Tasks and that can't be good.
    
        Return the Future's result, or raise its exception.
        """
        self._check_closed()
        self._check_running()
    
        new_task = not futures.isfuture(future)
        future = tasks.ensure_future(future, loop=self)
        if new_task:
            # An exception is raised if the future didn't complete, so there
            # is no need to log the "destroy pending task" message
            future._log_destroy_pending = False
    
        future.add_done_callback(_run_until_complete_cb)
        try:
            self.run_forever()
        except:
            if new_task and future.done() and not future.cancelled():
                # The coroutine raised a BaseException. Consume the exception
                # to not log a warning, the caller doesn't have access to the
                # local task.
                future.exception()
            raise
        finally:
            future.remove_done_callback(_run_until_complete_cb)
        if not future.done():
>           raise RuntimeError('Event loop stopped before Future completed.')
E           RuntimeError: Event loop stopped before Future completed.

future     = <Task finished name='Task-159' coro=<wait_for() done, defined at ............/_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/tasks.py:436> result=None>
new_task   = False
self       = <_UnixSelectorEventLoop running=False closed=True debug=False>

../.........../_temp/uv-python-dir/cpython-3.11.15-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py:652: RuntimeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

2 participants