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(slack source): Add retries to pulling information from DataHub #12401

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@

powerbi_report_server = {"requests", "requests_ntlm"}

slack = {"slack-sdk==3.18.1"}
slack = {"slack-sdk==3.18.1", "tenacity>=8.0.1",}

databricks = {
# 0.1.11 appears to have authentication issues with azure databricks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from pydantic import Field, SecretStr
from slack_sdk import WebClient
from tenacity import retry, wait_exponential
from tenacity.before_sleep import before_sleep_log

Check warning on line 9 in metadata-ingestion/src/datahub/ingestion/source/slack/slack.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/slack/slack.py#L8-L9

Added lines #L8 - L9 were not covered by tests

import datahub.emitter.mce_builder as builder
from datahub.configuration.common import ConfigModel
Expand Down Expand Up @@ -294,6 +296,10 @@
return
raise e

@retry(

Check warning on line 299 in metadata-ingestion/src/datahub/ingestion/source/slack/slack.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/slack/slack.py#L299

Added line #L299 was not covered by tests
wait=wait_exponential(multiplier=2, min=4, max=60),
before_sleep=before_sleep_log(logger, logging.ERROR, True),
)
def get_user_to_be_updated(self) -> Iterable[CorpUser]:
graphql_query = textwrap.dedent(
"""
Expand Down
Loading