Skip to content

Conversation

mwbrooks
Copy link
Member

Summary

This pull request updates the chat_startStream method to require the thread_ts argument.

I've categorized this as a fix, since the Slack API has been updated to now require thread_ts when starting a conversation stream.

We'll want to update our AI Sample app to also require thread_ts once this is merged.

Testing

Category

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

Requirements

  • 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 python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@mwbrooks mwbrooks self-assigned this Sep 29, 2025
@mwbrooks mwbrooks added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch web-client Version: 3x area:async python Pull requests that update Python code labels Sep 29, 2025
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (ai-apps@2ee91df). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             ai-apps    #1753   +/-   ##
==========================================
  Coverage           ?   85.01%           
==========================================
  Files              ?      113           
  Lines              ?    12955           
  Branches           ?        0           
==========================================
  Hits               ?    11014           
  Misses             ?     1941           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member Author

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharing my learnings with the reviewers 🧠 ⚡ 🔖

Comment on lines +571 to +574
self.api_methods_to_call.remove(method(channel="C123", thread_ts="123.123")["method"])
await async_method(channel="C123", thread_ts="123.123")
method(channel="C123", thread_ts="123.123", recipient_team_id="T123", recipient_user_id="U123")
await async_method(channel="C123", thread_ts="123.123", recipient_team_id="T123", recipient_user_id="U123")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newb: There is no need to add a test that asserts that a method requires thread_ts since the tests will fail with a TypeError when a Python function's required argument is missing.

@mwbrooks mwbrooks requested review from srtaalej and zimeg September 29, 2025 23:45
@mwbrooks mwbrooks marked this pull request as ready for review September 29, 2025 23:45
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks So glad you're catching this before a release. I like the requirements this brings us to start 🚢 💨

Comment on lines +571 to +572
self.api_methods_to_call.remove(method(channel="C123", thread_ts="123.123")["method"])
await async_method(channel="C123", thread_ts="123.123")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 praise: Thanks for aligning these tests to expected API calls!

👁️‍🗨️ thought: Once these methods are released we might want to include integration tests for some of these cases since it's not so clear that the recipient information is needed for channels in these arguments. No blocker here since that's so outside the scope of these tests!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion @zimeg! I'll add it to our tasks 👌🏻

@mwbrooks mwbrooks merged commit 262a7b9 into ai-apps Sep 30, 2025
12 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-ai-apps-thread_ts-required branch September 30, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:async bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented python Pull requests that update Python code semver:patch Version: 3x web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants