-
Notifications
You must be signed in to change notification settings - Fork 219
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
Correct the rate limit tier setting for users.profile.set
API calls
#1268
Correct the rate limit tier setting for users.profile.set
API calls
#1268
Conversation
This happens when `AsyncRateLimitExecutor.execute` is called. There is a separate thread that will update the queue depth metric, but ideally it is never reset to 0 incorrectly. When the metric is reset it can lead to no (or incorrect) backoff being calculated in `WaitTimeCalculator.calculateWaitTime`.
…atch the documentation https://api.slack.com/apis/rate-limits#profile_updates indicates the rate limit is 30 requests per minute so `Tier2` seems more appropriate / safer.
Hi @gunrein, thank you so much for taking the time to send this PR. It appears that the rate limit for users.profile.set may |
slack-api-client/src/main/java/com/slack/api/methods/MethodsRateLimits.java
Outdated
Show resolved
Hide resolved
Great, thanks @seratch. I'll back out the change to the internal method. One question on that, though (feel free to tell me it isn't worth explaining; no worries)... the original code was
Doesn't the second call |
@gunrein Ah, you're right on the point. It seems the code should be improved, but this SDK has similar code in other modules too, so I will do more investigation on it later on. Thus, could you make this PR as simple as possible for now? Thank you so much for pointing the issue out. |
users.profile.set
users.profile.set
API calls
@seratch - of course. The tier is now 3 and the other changes are reverted from the branch. Thanks for taking a look at the issue. |
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1268 +/- ##
============================================
+ Coverage 74.28% 74.33% +0.04%
- Complexity 4122 4124 +2
============================================
Files 443 443
Lines 13092 13092
Branches 1324 1324
============================================
+ Hits 9726 9732 +6
+ Misses 2592 2588 -4
+ Partials 774 772 -2 ☔ View full report in Codecov by Sentry. |
Thanks for providing this client library!
We have recently had some trouble with rate limiting on the
users.profile.set
method. This PR makes two changes.methods
client where the queue depth for a method is reset to 0 whenAsyncRateLimitExecutor.execute
is called. There is a separate thread that will update the queue depth metric, but ideally it is never reset to 0 incorrectly. When the metric is reset it can lead to no (or incorrect) backoff being calculated inWaitTimeCalculator.calculateWaitTime
.users.profile.set
to more closely match the documentation. https://api.slack.com/apis/rate-limits#profile_updates indicates the rate limit is 30 requests per minute soTier2
seems more appropriate / safer.Category (place an
x
in each of the[ ]
)Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.