Run (some) test suites in CI with --tpt-proto uds#422
Draft
goodboy wants to merge 3 commits intomacos_in_cifrom
Draft
Run (some) test suites in CI with --tpt-proto uds#422goodboy wants to merge 3 commits intomacos_in_cifrom
--tpt-proto uds#422goodboy wants to merge 3 commits intomacos_in_cifrom
Conversation
Add a 6s timeout guard around `test_streaming_to_actor_cluster()` to catch hangs, and nest the `async with` block inside it. Found this when running `pytest tests/ --tpt-proto uds`. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
Event on linux i was noticing lotsa false negatives based on sub teardown race conditions, so this tries to both make way for (eventually?) expanding the set of suite cases and ensure the current ones are more reliable on every run. The main change is to hange the `error_in_child=False` case to use parent-side-cancellation via a new `trio.move_on_after(timeout)` instead of `actor.cancel_soon()` (which is now toggled by a new `self_cancel: bool` but unused rn), and add better teardown assertions. Low level deats, - add `rent_cancel`/`self_cancel` params to `crash_and_clean_tmpdir()` for different cancel paths; default to `rent_cancel=True` which just sleeps forever letting the parent's timeout do the work. - use `trio.move_on_after()` with longer timeouts per case: 1.6s for error, 1s for cancel. - use the `.move_on_after()` cancel-scope to assert `.cancel_called` pnly when `error_in_child=False`, indicating we parent-graceful-cancelled the sub. - add `loglevel` fixture, pass to `open_nursery()`. - log caught `RemoteActorError` via console logger. - add `ids=` to parametrize for readable test names. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
I started getting annoyed by all the warnings from `pytest` during work on macos suport in CI, so this replaces all `Actor.uid`/`Channel.uid` accesses with `.aid.uid` (or `.aid.reprol()` for log msgs) across the core runtime and IPC subsystems to avoid the noise. This also provides incentive to start the adjustment to all `.uid`-holding/tracking internal `dict`-tables/data-structures to instead use `.msg.types.Aid`. Hopefully that will come a (vibed?) follow up shortly B) Deats, - `._context`: swap all `self._actor.uid`, `self.chan.uid`, and `portal.actor.uid` refs to `.aid.uid`; use `.aid.reprol()` for log/error formatting. - `._rpc`: same treatment for `actor.uid`, `chan.uid` in log msgs and cancel-scope handling; fix `str(err)` typo in `ContextCancelled` log. - `._runtime`: update `chan.uid` -> `chan.aid.uid` in ctx cache lookups, RPC `Start` msg, registration and cancel-request handling; improve ctxc log formatting. - `._spawn`: replace all `subactor.uid` with `.aid.uid` for child-proc tracking, IPC peer waiting, debug-lock acquisition, and nursery child dict ops. - `._supervise`: same for `subactor.uid` in cancel and portal-wait paths; use `actor.aid.uid` for error dict. - `._state`: fix `last.uid` -> `last.aid.uid` in `current_actor()` error msg. Also, - `._chan`: make `Channel.aid` a proper `@property` backed by `._aid` so we can add validation/typing later. - `.log`: use `current_actor().aid.uuid` instead of `.uid[1]` for actor-uid log field. - `.msg.types`: add TODO comment for `Start.aid` field conversion. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code
--tpt-proto uds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working patch for #420