Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1561,12 +1561,15 @@ def get_connection_object_page(
}}""",
)
else:
# As of Tableau Server 2024.2, the metadata API sporadically returns a 30-second
# timeout error.
# It doesn't reliably happen, so retrying a couple of times makes sense.
if all(
# As of Tableau Server 2024.2, the metadata API sporadically returns a 30-second
# timeout error.
# It doesn't reliably happen, so retrying a couple of times makes sense.
error.get("message")
== "Execution canceled because timeout of 30000 millis was reached"
# The Metadata API sometimes returns an 'unexpected error' message when querying
# embeddedDatasourcesConnection. Try retrying a couple of times.
or error.get("message") == "Unexpected error occurred"
for error in errors
):
# If it was only a timeout error, we can retry.
Expand All @@ -1578,8 +1581,8 @@ def get_connection_object_page(
(self.config.max_retries - retries_remaining + 1) ** 2, 60
)
logger.info(
f"Query {connection_type} received a 30 second timeout error - will retry in {backoff_time} seconds. "
f"Retries remaining: {retries_remaining}"
f"Query {connection_type} received a retryable error with {retries_remaining} retries remaining, "
f"will retry in {backoff_time} seconds: {errors}"
)
time.sleep(backoff_time)
return self.get_connection_object_page(
Expand Down
Loading