Skip to content

Commit

Permalink
fix(ingest/gc): fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal committed Jan 15, 2025
1 parent a4f5ab4 commit 97c5362
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class SoftDeletedEntitiesCleanupConfig(ConfigModel):

@dataclass
class SoftDeletedEntitiesReport(SourceReport):
num_queries_found: int = 0
num_entities_found: Dict[str, int] = field(default_factory=dict)
num_soft_deleted_entity_processed: int = 0
num_soft_deleted_retained_due_to_age: int = 0
num_soft_deleted_entity_removal_started: int = 0
Expand Down Expand Up @@ -277,7 +277,11 @@ def _get_soft_deleted(self, graphql_query: str, entity_type: str) -> Iterable[st
# We make the batch size = config after call has succeeded once
batch_size = self.config.batch_size
scroll_id = scroll_across_entities.get("nextScrollId")
self.report.num_queries_found += scroll_across_entities.get("count")
if entity_type not in self.report.num_entities_found:
self.report.num_entities_found[entity_type] = 0
self.report.num_entities_found[entity_type] += scroll_across_entities.get(

Check warning on line 282 in metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/gc/soft_deleted_entity_cleanup.py#L280-L282

Added lines #L280 - L282 were not covered by tests
"count"
)
for query in scroll_across_entities.get("searchResults"):
yield query["entity"]["urn"]

Expand Down

0 comments on commit 97c5362

Please sign in to comment.