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

Send message fails to retry on ratelimited error #292

Closed
4 of 10 tasks
andre-qumulo opened this issue Mar 12, 2024 · 2 comments · Fixed by #333
Closed
4 of 10 tasks

Send message fails to retry on ratelimited error #292

andre-qumulo opened this issue Mar 12, 2024 · 2 comments · Fixed by #333
Labels
enhancement New feature or request
Milestone

Comments

@andre-qumulo
Copy link

Description

We had a send fail with:

Run slackapi/slack-github-action@v1.25.0
axios post failed, double check the payload being sent includes the keys Slack expects
{
  username: 'github/repo',
  channel: '#some-channel',
  text: 'A message'
}
Error: {"retry_after":1,"ok":false,"error":"rate_limited"}
Error: Request failed with status code 429

It seems like this failure could be retries after a default timeout

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

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

  • 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 searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version: 1.25.0

node version:

OS version(s):

Steps to reproduce:

  1. Have a message get a rate_limited error

Expected result:

The action would retry up to an upper limit of time

Actual result:

The action just fails

Attachments:

Run slackapi/slack-github-action@v1.25.0
axios post failed, double check the payload being sent includes the keys Slack expects
{
  username: 'github/repo',
  channel: '#some-channel',
  text: 'A message'
}
Error: {"retry_after":1,"ok":false,"error":"rate_limited"}
Error: Request failed with status code 429
@WilliamBergamin WilliamBergamin added the enhancement New feature or request label Mar 12, 2024
@WilliamBergamin
Copy link
Contributor

WilliamBergamin commented Mar 12, 2024

Hi @andre-qumulo thanks for writing in 💯

This seems to be a feature request for a retry option, we already have #245 open on the subject of retries

@zimeg zimeg added this to the 2.0 milestone Nov 15, 2024
@zimeg zimeg linked a pull request Nov 15, 2024 that will close this issue
8 tasks
@zimeg
Copy link
Member

zimeg commented Nov 15, 2024

👋 Hello! We landed support for a retries option in @v2.0.0 that'll retry failed API requests that might succeed again, such as the 429 rate_limited error you're finding here.

Different options of available timing are included in the README, but an example step with retries and the latest update might resemble:

- name: Allow multiple attempts for sending
  uses: slackapi/slack-github-action@v2.0.0
  with:
    retries: rapid
    webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
    webhook-type: webhook-trigger
    payload: |
      username: "github/repo"
      channel: "#some-channel"
      text: "A message"

This option applies to all other sending techniques too, and now that it's been released I think we can close this issue! Please feel free to follow up if you're finding this isn't working as you're expecting, but otherwise I hope rate limits can be mostly avoided with good timings 👻

@zimeg zimeg closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants