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(ingest/sac): handle descriptions which are None correctly #11572

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

Masterchen09
Copy link
Contributor

It is technically possible that the descriptions for Stories, Models and columns of Import Data models are None...this PR fixes the handling of such cases.

Additionally some more HTTP statuses will be retried (400 and 503) - unfortunately the Import Data API is a bit unstable and returns these HTTP status codes from time to time, although everything else is working.

FYI @hsheth2

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 ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Oct 9, 2024
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

mostly looks good, just a few minor nits

@@ -559,7 +561,7 @@ def get_sac_connection(

retries = 3
backoff_factor = 10
status_forcelist = (500,)
status_forcelist = (400, 500, 503)
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's add a comment around this - similar to the PR description

description=(
column["descriptionName"].strip()
if "descriptionName" in column
and column["descriptionName"] is not None
Copy link
Collaborator

Choose a reason for hiding this comment

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

if column.get("descriptionName") is not None

@Masterchen09
Copy link
Contributor Author

@hsheth2 I have added a comment on why we have to retry requests with these HTTP status codes. 😊

@hsheth2 hsheth2 changed the title fix(ingestion/sac): handle descriptions which are None correctly fix(ingest/sac): handle descriptions which are None correctly Oct 11, 2024
@hsheth2 hsheth2 merged commit 14c7938 into datahub-project:master Oct 11, 2024
72 of 73 checks passed
@Masterchen09 Masterchen09 deleted the fix-sac-descriptions branch October 23, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants