-
Notifications
You must be signed in to change notification settings - Fork 705
Closed
Description
I am not sure if this counts as a bug or documentation issue
We have code that runs in an AWS lambda that calls github and jira apis
jira = Jira(JIRA_URL, token=JIRA_TOKEN)
....
# do some other stuff including calling github api
...
jira_ticket = jira.get_issue(jira_ticket_number)
Since version 4.0.5 this started failing on jira.get_issue for with this stack trace
...
File "/var/task/atlassian/jira.py", line 1199, in get_issue
return self.get(url, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/task/atlassian/rest_client.py", line 561, in get
response = self.request(
^^^^^^^^^^^^^
File "/var/task/atlassian/rest_client.py", line 450, in request
self.raise_for_status(response)
File "/var/task/atlassian/rest_client.py", line 999, in raise_for_status
raise HTTPError(error_msg, response=response)
requests.exceptions.HTTPError: You do not have the permission to see the specified issue.
Login Required
I think this was introduced in #1566 - I suspect there is some clash between calling github api and jira apis and session re-use
Explicitly setting a session and passing to the Jira constructor seems to fix it
jira_session = requests.Session()
jira = Jira(JIRA_URL, token=JIRA_TOKEN, session=jira_session)
so its not a blocker for us, but dont know if this needs further investigation or documentation updates
Metadata
Metadata
Assignees
Labels
No labels