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

refactor(metadata-ingestion/pattern_cleanup_ownership): add logging f… #12536

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cccs-cat001
Copy link
Contributor

…or un-parseable owner urns

I was getting the following error due to some owner URNs not being a valid URN. It would fail our ingestion pipeline. I figure being able to warn about it and move along would be a good solution.
image

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 Feb 3, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Feb 3, 2025
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 18.75000% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ingestion/transformer/pattern_cleanup_ownership.py 18.75% 13 Missing ⚠️

❌ Your patch check has failed because the patch coverage (18.75%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
...ingestion/transformer/pattern_cleanup_ownership.py 72.22% <18.75%> (-23.02%) ⬇️

... and 45 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64aaaf1...3eb8292. Read the comment docs.

user_id = re.sub(value, "", user_id)
cleaned_owner_urns.append(_USER_URN_PREFIX + user_id)
except IndexError:
log.warning(f"Could not parse {owner_urn} from {entity_urn}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add some tests that repro the issue?

does it happen when group urns get passed in, or some other situation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmm yes that's right, it's when it's a group urn. I never actually noticed that pattern 😅

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Feb 11, 2025
@cccs-cat001
Copy link
Contributor Author

I've added a case for group ownership.

I kept the exception logging in case anyone else finds a situation where it won't parse the owner properly.

@cccs-cat001 cccs-cat001 requested a review from hsheth2 February 11, 2025 19:55
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Feb 11, 2025
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 needs-review Label for PRs that need review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants