- Is this your first time deploying Airbyte?: No
- OS Version / Instance: Linux/UNIX on EC2
- Memory / Disk: 100 GB
- Deployment: Docker
- Airbyte Version: 0.40.9
- Source name/version: source-jira 0.3.3
- Destination name/version: destination-snowflake 0.4.42
- Step: The issue occurred when upgrading to the latest version
- Description: The source-jira connector fails with a KeyError for ‘projectId’ when attempting to sync board_issues. Based on the commits, it appears this was introduced in version 0.3.1.
When retrieving boards for the affected project there is a board with a location that looks like this:
“location”: {
“userId”: 1234,
“userAccountId”: “1234abcd”,
“displayName”: “Some Name”,
“avatarURI”: “https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/1234…”,
“name”: “Some Name”
}
This location does not have a projectId field and therefore there is a KeyError when looking for one. It seems like there should be a check to see if this field exists and maybe some case to use the projectId that is used in the request if one is not present.
Full Traceback below:
2023-01-19 00:27:01 source > Encountered an exception while reading stream board_issues
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py”, line 111, in read
yield from self._read_stream(
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py”, line 180, in _read_stream
for record in record_iterator:
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/abstract_source.py”, line 290, in _read_full_refresh
for record_data_or_message in record_data_or_messages:
File “/airbyte/integration_code/source_jira/streams.py”, line 232, in read_records
for board in read_full_refresh(self.boards_stream):
File “/airbyte/integration_code/source_jira/utils.py”, line 23, in read_full_refresh
for record in records:
File “/airbyte/integration_code/source_jira/streams.py”, line 192, in read_records
for board in super().read_records(**kwargs):
File “/airbyte/integration_code/source_jira/streams.py”, line 90, in read_records
yield from super().read_records(**kwargs)
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 413, in read_records
yield from self._read_pages(
File “/usr/local/lib/python3.9/site-packages/airbyte_cdk/sources/streams/http/http.py”, line 430, in _read_pages
yield from records_generator_fn(request, response, stream_state, stream_slice)
File “/airbyte/integration_code/source_jira/streams.py”, line 81, in parse_response
yield self.transform(record=record, **kwargs)
File “/airbyte/integration_code/source_jira/streams.py”, line 197, in transform
record[“projectId”] = str(record[“location”][“projectId”])
KeyError: ‘projectId’