Custom Values passed into correctly into Bot/Installation class when cloned during token rotation #1636
Labels
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
oauth
web-client
Milestone
(Filling out the following details about bugs will help us solve your issue sooner.)
Reproducible in:
The Slack SDK version
Python runtime version
OS info
ProductName: macOS ProductVersion: 14.0 BuildVersion: 23A344 Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020
Steps to reproduce:
custom_values
+token_rotation
enabledtoken_rotation
if custom_values exists, this line: https://github.com/slackapi/python-slack-sdk/blob/main/slack_sdk/oauth/token_rotation/rotator.py#L88 fails because it tries to pass the custom_values which in my case are thedict
of values. TheBot
class doesn't expect certain values.Expected result:
Expect the Bot to be cloned with custom values correctly.
https://github.com/slackapi/python-slack-sdk/blob/main/slack_sdk/oauth/installation_store/models/bot.py#L90
Seems to merge the entries into a flat dictionary so that when it is passed into the
Bot(**bot.to_dict())
it passes all the key/value pairs. It seems it should instead pass the custom_values as a key instead.Original
Potential Fix
Which would then allow it to be passed into the
Bot()
classActual result:
Error:
The text was updated successfully, but these errors were encountered: