-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.2.x] Add Socket Mode implementation #883
Merged
Merged
Conversation
This file contains 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
This was referenced Dec 1, 2020
seratch
force-pushed
the
v3.2-socket-mode
branch
2 times, most recently
from
December 2, 2020 12:34
072861e
to
07febd8
Compare
Codecov Report
@@ Coverage Diff @@
## main #883 +/- ##
==========================================
- Coverage 87.94% 86.09% -1.86%
==========================================
Files 35 51 +16
Lines 3385 4602 +1217
==========================================
+ Hits 2977 3962 +985
- Misses 408 640 +232
Continue to review full report at Codecov.
|
seratch
force-pushed
the
v3.2-socket-mode
branch
2 times, most recently
from
December 8, 2020 13:02
f0452ff
to
2fd040b
Compare
* sync: built-in implementation, websocket-client * async: aiohttp, websockets
seratch
force-pushed
the
v3.2-socket-mode
branch
from
January 8, 2021 05:22
9b806ba
to
5f3a8bc
Compare
4 tasks
seratch
force-pushed
the
v3.2-socket-mode
branch
from
January 9, 2021 02:36
b4a1132
to
b04230a
Compare
seratch
force-pushed
the
v3.2-socket-mode
branch
3 times, most recently
from
January 9, 2021 13:52
1317b44
to
c98cc16
Compare
seratch
force-pushed
the
v3.2-socket-mode
branch
from
January 9, 2021 15:33
d7ce992
to
d34f846
Compare
stevengill
approved these changes
Jan 12, 2021
11 tasks
7 tasks
16 tasks
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.
Summary
This pull request is still work in progress. We may change the APIs and/or implementations before releasing this.
The changes here include all required functionalities for Socket Mode support, such as WSS URL acquisition, bidirectional communications with the Slack server over a WebSocket connection, maintaining WS connections, and relaying only envelope messages to Bolt framework or something similar.
The basic usage of the module would be:
If you want to use Socket Mode along with asyncio, the default way is to use AIOHTTP library as with the
AsyncWebClient
.Supported External Libraries
In the initial version, the SDK is going to support the following major libraries for the low-level WebSocket client layer, in addition to its own built-in implementation.
We decided not to support the following libraries at least in v3.2 series.
The
BaseSocketModeClient
andAsyncBaseSocketModeClient
provide good abstraction and the interface never depends on any of these specific library's interface. We accept the difference of a bit detailed configuration in the subtypes of the interface. For instance,websockets
library does not support proxy settings at this moment. Asaiohttp
does not haveOPEN
message events, the implementation for this library does not offeron_open_listeners
. These differences never appear in the base class (interface) level.Other things that should be mentioned
Category (place an
x
in each of the[ ]
)Requirements (place an
x
in each[ ]
)python setup.py validate
after making the changes.