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

feat(ingestion/iceberg): Improve iceberg connector logging #12317

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

skrydal
Copy link
Collaborator

@skrydal skrydal commented Jan 10, 2025

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 Jan 10, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jan 10, 2025
@@ -146,19 +147,40 @@ def get_catalog(self) -> Catalog:
return load_catalog(name=catalog_name, **catalog_config)


class TopTableTimings:
Copy link
Contributor

Choose a reason for hiding this comment

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

have you considered using the existing TopKDict?

class TopKDict(DefaultDict[_KT, _VT]):

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes but it didn't fit my solution in 100%, I wanted to log some more information than just key of the dictionary, I would need to either make dictionary key a tuple (making it even more prone to errors) or keep reference table, which needs to be printed somehow anyway. I decided this would be the simplest solution.

@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 Jan 10, 2025
@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 Jan 10, 2025
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...datahub/ingestion/source/iceberg/iceberg_common.py 93.75% 2 Missing ⚠️
Files with missing lines Coverage Δ
...on/src/datahub/ingestion/source/iceberg/iceberg.py 96.95% <100.00%> (ø)
...tahub/ingestion/source/iceberg/iceberg_profiler.py 91.30% <100.00%> (ø)
...datahub/ingestion/source/iceberg/iceberg_common.py 97.41% <93.75%> (-1.52%) ⬇️

... and 6 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 a6cd995...eb14f5c. Read the comment docs.

Copy link
Contributor

@sgomezvillamor sgomezvillamor left a comment

Choose a reason for hiding this comment

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

Even if it's not the TopKDict, keeping a collection of items sorted by a specific field is a common functionality and so it might be beneficial to define it generically so it can be shared. Keeping it within the iceberg source makes it harder to locate and so used.

I agree this can be understood as early not-needed-yet optimization/generalization. Being this more about personal preference than strong arguments, I'm approving.

Anyway, adding unit tests for the new class, regardless of the approach, would be great for maintaining coverage.

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Jan 13, 2025
@skrydal skrydal merged commit 457f96e into datahub-project:master Jan 13, 2025
223 checks passed
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