aiidateam / kiwipy

A python messaging library for RPC, task queues and broadcasts
https://kiwipy.readthedocs.io
Other
15 stars 4 forks source link

Reinstanting RmqThreadCommunicator tests #124

Closed muhrin closed 1 year ago

muhrin commented 1 year ago

The release of kiwipy v0.8.0 made some breaking changes to the intended API of RmqThreadCommunicator. I'm putting back tests that check for the intended API which will be fixed in due time.

sphuber commented 1 year ago

Apologies captain, thanks for jumping in. Anyway had to quickly make a 0.8.1 to unpin some very strict dependency requirements

muhrin commented 1 year ago

Nae dramas, I think it'll be a quick fix.

codecov[bot] commented 1 year ago

Codecov Report

Base: 89.54% // Head: 90.20% // Increases project coverage by +0.67% :tada:

Coverage data is based on head (5f503f1) compared to base (50c729a). Patch coverage: 90.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #124 +/- ## =========================================== + Coverage 89.54% 90.20% +0.67% =========================================== Files 15 15 Lines 1137 1132 -5 =========================================== + Hits 1018 1021 +3 + Misses 119 111 -8 ``` | [Impacted Files](https://codecov.io/gh/aiidateam/kiwipy/pull/124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam) | Coverage Δ | | |---|---|---| | [src/kiwipy/rmq/threadcomms.py](https://codecov.io/gh/aiidateam/kiwipy/pull/124/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam#diff-c3JjL2tpd2lweS9ybXEvdGhyZWFkY29tbXMucHk=) | `93.72% <50.00%> (+5.67%)` | :arrow_up: | | [src/kiwipy/rmq/tasks.py](https://codecov.io/gh/aiidateam/kiwipy/pull/124/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam#diff-c3JjL2tpd2lweS9ybXEvdGFza3MucHk=) | `94.96% <100.00%> (-0.56%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidateam)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

muhrin commented 1 year ago

Ok. I've fixed the problem. Turned out to be an upstream bug in pytray.LoopScheduler. Long story short, it was propagating a future the wrong way around: instead of the result from a thread future being passed to the asyncio future, it was doing the opposite. Ultimately this meant that the RmqIncomingTask.processing() context would never have a value in the future it was waiting on, and therefore assume that the task should just be requeued.

All fixed in pytray 0.3.4.