Skip to content
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

Fix #1025 websocket_client based SocketModeClient may fail in on_close callback #1026

Merged
merged 2 commits into from May 28, 2021

Conversation

seratch
Copy link
Member

@seratch seratch commented May 28, 2021

Summary

This pull request fixes #1025 by updating the internal method signature of on_close listeners. It seems that this callback may not be called in common patterns (we don't have any unit tests reproducing the error). But when it's called, the current implementation is not compatible.

References:

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)
  • /docs-src (Documents, have you run ./docs.sh?)
  • /docs-src-v2 (Documents, have you run ./docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python setup.py validate after making the changes.

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented Version: 3x socket-mode labels May 28, 2021
@seratch seratch added this to the 3.6.0 milestone May 28, 2021
@seratch seratch self-assigned this May 28, 2021
@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #1026 (2bff457) into main (97a5250) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1026   +/-   ##
=======================================
  Coverage   83.66%   83.66%           
=======================================
  Files          95       95           
  Lines        8792     8792           
=======================================
  Hits         7356     7356           
  Misses       1436     1436           
Impacted Files Coverage Δ
slack_sdk/socket_mode/websocket_client/__init__.py 60.76% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97a5250...2bff457. Read the comment docs.

@seratch seratch merged commit ef81a8d into slackapi:main May 28, 2021
@seratch seratch deleted the issue-1025-websocket_client_on_close branch May 28, 2021 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented socket-mode Version: 3x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

websocket_client based SocketModeClient may fail in on_close callback
2 participants