Uh oh!
There was an error while loading. Please reload this page.
fix: improve Socket Mode client stability and correctness - #1854
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #1854 +/- ##
==========================================
+ Coverage 83.99% 84.01% +0.01%
==========================================
Files 117 117 Lines 13253 13256 +3 ==========================================
+ Hits 11132 11137 +5 + Misses 2121 2119 -2 ☔ View full report in Codecov by Sentry. |
srtaalej
left a comment
There was a problem hiding this comment.
LGTM ⭐ but looks like you have some unit tests failing - i left a comment with a potench solution?
| def test_connect_to_new_endpoint_does_not_release_lock_on_acquisition_timeout(self): | ||
| client = BaseSocketModeClient.__new__(BaseSocketModeClient) | ||
| client.logger = self.logger | ||
| client.connect_operation_lock = create_autospec(Lock(), acquire=MagicMock(return_value=False)) |
There was a problem hiding this comment.
looks like this is where unit tests are failing. this is the fix according to claude
| client.connect_operation_lock=create_autospec(Lock(), acquire=MagicMock(return_value=False)) | |
| mock_lock=create_autospec(Lock()) | |
| mock_lock.acquire.return_value=False | |
| client.connect_operation_lock=mock_lock |
There was a problem hiding this comment.
Thats spot on 💯 thanks for sharing the solution 🥇
Uh oh!
There was an error while loading. Please reload this page.
Summary
These changes aim to improve the stability and correctness of socket-mode client, the issues were mainly found using AI tools and confirmed by human to be legitimate.
This does not introduce any behavior change to the project
Testing
CI testing should be sufficient
Category
/docs(Documents)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.