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

fix(tableau): retry if 502 error code #12233

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

sgomezvillamor
Copy link
Contributor

Yet another retriable error code we have received recently

Internal error 502 at https://prod-useast-a.online.tableau.com/api/metadata/graphql
b'<html><body><h1>502 Bad Gateway</h1>\nThe server returned an invalid or incomplete response.\n</body></html>\n\n'
Traceback (most recent call last):
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau.py", line 1186, in get_connection_object_page
    query_data = query_metadata_cursor_based_pagination(
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/datahub/ingestion/source/tableau/tableau_common.py", line 959, in query_metadata_cursor_based_pagination
    result = server.metadata.query(
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 274, in wrapper
    return func(self, *args, **kwargs)
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/tableauserverclient/server/endpoint/metadata_endpoint.py", line 71, in query
    server_response = self.post_request(url, graphql_query, content_type="application/json", parameters=parameters)
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 226, in post_request
    return self._make_request(
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 141, in _make_request
    self._check_status(server_response, url)
  File "/tmp/datahub/ingest/venv-tableau-1f7583b4403d3273/lib/python3.10/site-packages/tableauserverclient/server/endpoint/endpoint.py", line 159, in _check_status
    raise InternalServerError(server_response, url)
tableauserverclient.server.endpoint.exceptions.InternalServerError: 

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Dec 27, 2024
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Dec 27, 2024
@@ -186,6 +186,11 @@
except ImportError:
REAUTHENTICATE_ERRORS = (NonXMLResponseError,)

RETRIABLE_ERROR_CODES = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open questions:

  • should we include others such as 503 service Unavailable, 408 Request Timeout, ....?
  • should we make this configurable in the recipe?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include others such as 503 service Unavailable, 408 Request Timeout, ....?

We can add these codes for retry. Can add 408 if we got that from tableau and if request is likely to succeed on retry although given it represents client side idleness, that may not be relevant here.

should we make this configurable in the recipe?

I believe - making it configurable is okay for one-off debugging but would not help us make source more robust, as we would ideally always want to update source such that known retriable error codes are always retried. So I would rather not add it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have aligned on existing retrievable error codes and added 408

I didn't know about the retry configuration at Tableau Server level. Either it is not working as expected or not correctly configured.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, this needs to be looked into.

@@ -186,6 +186,11 @@
except ImportError:
REAUTHENTICATE_ERRORS = (NonXMLResponseError,)

RETRIABLE_ERROR_CODES = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include others such as 503 service Unavailable, 408 Request Timeout, ....?

We can add these codes for retry. Can add 408 if we got that from tableau and if request is likely to succeed on retry although given it represents client side idleness, that may not be relevant here.

should we make this configurable in the recipe?

I believe - making it configurable is okay for one-off debugging but would not help us make source more robust, as we would ideally always want to update source such that known retriable error codes are always retried. So I would rather not add it.

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Dec 27, 2024
@sgomezvillamor sgomezvillamor merged commit 29e4528 into master Dec 27, 2024
78 of 79 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/cus-3546-tablea-retry-502 branch December 27, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants