Skip to content

Commit

Permalink
馃悰 Source JIRA: fix 404 error (#33625)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem1205 committed Dec 20, 2023
1 parent 78513b6 commit a95c1bf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-jira/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 68e63de2-bb83-4c7e-93fa-a8a9051e3993
dockerImageTag: 0.14.0
dockerImageTag: 0.14.1
dockerRepository: airbyte/source-jira
documentationUrl: https://docs.airbyte.com/integrations/sources/jira
githubIssueLabel: source-jira
Expand Down
13 changes: 13 additions & 0 deletions airbyte-integrations/connectors/source-jira/source_jira/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def reasons_for_unavailable_status_codes(self, stream: Stream, logger: Logger, s
reasons_for_codes: Dict[int, str] = {
requests.codes.FORBIDDEN: "Please check the 'READ' permission(Scopes for Connect apps) and/or the user has Jira Software rights and access.",
requests.codes.UNAUTHORIZED: "Invalid creds were provided, please check your api token, domain and/or email.",
requests.codes.NOT_FOUND: "Please check the 'READ' permission(Scopes for Connect apps) and/or the user has Jira Software rights and access.",
}
return reasons_for_codes

Expand Down Expand Up @@ -961,6 +962,12 @@ class ProjectAvatars(JiraStream):
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-rest-api-3-project-projectidorkey-avatars-get
"""

skip_http_status_codes = [
# Project is not found or the user does not have permission to view the project.
requests.codes.UNAUTHORIZED,
requests.codes.NOT_FOUND,
]

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.projects_stream = Projects(authenticator=self.authenticator, domain=self._domain, projects=self._projects)
Expand All @@ -986,6 +993,12 @@ class ProjectCategories(JiraStream):
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/#api-rest-api-3-projectcategory-get
"""

skip_http_status_codes = [
# Project is not found or the user does not have permission to view the project.
requests.codes.UNAUTHORIZED,
requests.codes.NOT_FOUND,
]

def path(self, **kwargs) -> str:
return "projectCategory"

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/jira.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ The Jira connector should not run into Jira API limitations under normal usage.

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| 0.14.1 | 2023-12-19 | [33625](https://github.com/airbytehq/airbyte/pull/33625) | Skip 404 error |
| 0.14.0 | 2023-12-15 | [33532](https://github.com/airbytehq/airbyte/pull/33532) | Add lookback window |
| 0.13.0 | 2023-12-12 | [33353](https://github.com/airbytehq/airbyte/pull/33353) | Fix check command to check access for all available streams |
| 0.12.0 | 2023-12-01 | [33011](https://github.com/airbytehq/airbyte/pull/33011) | Fix BoardIssues stream; increase number of retries for backoff policy to 10 |
Expand Down

0 comments on commit a95c1bf

Please sign in to comment.