Skip to content

jira/notify occasionally fails due to Atlassian Rate Limiting #38

Open
@bryan-lee-7r

Description

@bryan-lee-7r

Due to a large number of engineers on our team running jobs that use the jira/notify step, we've seen a couple of instances where the notify step errors due to a rate limiting error response from Atlassian.

Specifically, the error looks to be a jq error in parsing the response from Forge:

+ echo '  HTTP Status: 500'
  HTTP Status: 500
+ echo '  Errors:'
  Errors:
+ echo Error
+ jq .
jq: parse error: Invalid numeric literal at line 2, column 0

Exited with code exit status 5

In instances like this, the Forge response looks like this:

FORGE_RESPONSE='{"error":"Error","message":"Request rate limited","stack":"Error: Request rate limited\n    at Function.forErrorCode (index.js:1800:16)\n    at assertNoErrors (index.js:1823:33)\n    at getResponseBody (index.js:1838:5)\n    at async GlobalStorage.query (index.js:1931:16)\n    at async GlobalStorage.getInternal (index.js:1912:48)\n    at async getUserConfig (index.js:54237:12)\n    at async verifyAuth (index.js:54182:24)\n    at async handleOrbRequest (index.js:54278:9)","requestId":{request_id}}
500'

This causes the job to fail due to the error in the jira/notify step. Perhaps additional parsing of the Forge Response prior to invoking jq would help avoid the error in this case? Or if possible, an update to avoid the rate limit altogether would be ideal. Thanks in advance for your assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions