fix(cli): Fix to the deletion command (#14667)

Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
skrydal 2025-09-05 13:37:55 +02:00 committed by GitHub
parent d996f9b37f
commit cc8e87143e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View File

@ -469,6 +469,7 @@ def by_filter(
query=query,
status=soft_delete_filter,
batch_size=batch_size,
skip_cache=True,
)
)
if len(urns) == 0:

View File

@ -971,7 +971,8 @@ class DataHubGraph(DatahubRestEmitter, EntityVersioningAPI):
$orFilters: [AndFilterInput!],
$batchSize: Int!,
$scrollId: String,
$skipCache: Boolean!) {
$skipCache: Boolean!,
$includeSoftDeleted: Boolean) {
scrollAcrossEntities(input: {
query: $query,
@ -983,6 +984,7 @@ class DataHubGraph(DatahubRestEmitter, EntityVersioningAPI):
skipHighlighting: true
skipAggregates: true
skipCache: $skipCache
includeSoftDeleted: $includeSoftDeleted
}
}) {
nextScrollId
@ -1002,6 +1004,11 @@ class DataHubGraph(DatahubRestEmitter, EntityVersioningAPI):
"orFilters": orFilters,
"batchSize": batch_size,
"skipCache": skip_cache,
"includeSoftDeleted": (
None
if status is None
else status != RemovedStatusFilter.NOT_SOFT_DELETED
),
}
for entity in self._scroll_across_entities(graphql_query, variables):

View File

@ -616,6 +616,7 @@ def test_get_urns() -> None:
"batchSize": unittest.mock.ANY,
"scrollId": None,
"skipCache": False,
"includeSoftDeleted": None,
},
)
@ -667,5 +668,6 @@ def test_get_urns_with_skip_cache() -> None:
"batchSize": unittest.mock.ANY,
"scrollId": None,
"skipCache": True,
"includeSoftDeleted": None,
},
)