-
Notifications
You must be signed in to change notification settings - Fork 845
fix(web-client): update thread_ts
to be required for chat_startStream
#1753
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
There was a problem hiding this 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 🧠 ⚡ 🔖
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 🚢 💨
self.api_methods_to_call.remove(method(channel="C123", thread_ts="123.123")["method"]) | ||
await async_method(channel="C123", thread_ts="123.123") |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 👌🏻
Summary
This pull request updates the
chat_startStream
method to require thethread_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
/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.sh
after making the changes.