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

🐛 Source Monday: fails to parse backoff response #9459

Closed
awang opened this issue Jan 12, 2022 · 5 comments
Closed

🐛 Source Monday: fails to parse backoff response #9459

awang opened this issue Jan 12, 2022 · 5 comments

Comments

@awang
Copy link

awang commented Jan 12, 2022

Environment

  • Airbyte version: 0.33.2-alpha
  • OS Version / Instance: Ubuntu 20.04 (2 vCPU ARM)
  • Deployment: Docker compose
  • Source Connector and version: Monday
  • Destination Connector and version: Postgres
  • Severity: Very Low / Low / Medium / High / Critical
  • Step where error happened: Sync job

Current Behavior

I’m getting a Normalization Failed error. If I try turning off basic normalization, I then get the below JSON decode error. Logs attached

Logs

LOG

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 106, in read
    internal_config=internal_config,
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 136, in _read_stream
    for record in record_iterator:
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 208, in _read_full_refresh
    for record in records:
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/streams/http/http.py", line 351, in read_records
    response = self._send_request(request, request_kwargs)
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/streams/http/http.py", line 318, in _send_request
    return backoff_handler(user_backoff_handler)(request, request_kwargs)
  File "/usr/local/lib/python3.7/site-packages/backoff/_sync.py", line 94, in retry
    ret = target(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/backoff/_sync.py", line 94, in retry
    ret = target(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/streams/http/http.py", line 276, in _send
    if self.should_retry(response):
  File "/airbyte/integration_code/source_monday/source.py", line 54, in should_retry
    is_complex_query = response.json().get("errors")
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Are you willing to submit a PR?

yes!

@awang awang added needs-triage type/bug Something isn't working labels Jan 12, 2022
@awang awang changed the title Monday source fails to load Monday source fails to parse backoff response Jan 13, 2022
@alafanechere alafanechere changed the title Monday source fails to parse backoff response 🐛 Source Monday: fails to parse backoff response Jan 13, 2022
@alafanechere
Copy link
Contributor

Hi @awang could you please share your source and destination catalogs?

docker run -it --rm --volume airbyte_workspace:/data busybox cat /data/<job-id>/<attempt-id>/source_catalog.json
docker run -it --rm --volume airbyte_workspace:/data busybox cat /data/<job-id>/<attempt-id>/destination_catalog.json

@awang
Copy link
Author

awang commented Jan 13, 2022

@alafanechere sure!
catalogs.zip

@alafanechere
Copy link
Contributor

The error is probably on the Monday connector side, an API response seems to not contain JSON and the connector fails while trying to deserialize json.

@bleonard bleonard added autoteam team/tse Technical Support Engineers labels Apr 27, 2022
@marcosmarxm marcosmarxm added team/extensibility and removed team/tse Technical Support Engineers autoteam labels Jun 14, 2022
@bazarnov
Copy link
Collaborator

@alafanechere The source-monday has been migrated to the YAML Low-code and now we have the _safe_response_json() method added by this PR: https://github.com/airbytehq/airbyte/pull/18931/files This should be sufficient for such cases.

@lazebnyi I think this could be closed. Please confirm.

@bazarnov bazarnov self-assigned this Jun 12, 2023
@bazarnov
Copy link
Collaborator

Closing because the empty response issue handler is already implemented starting 0.2.0, with migration to Low Code: #19586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

No branches or pull requests

6 participants