|
4 | 4 | import logging |
5 | 5 | import uuid |
6 | 6 | from dataclasses import dataclass |
7 | | -from datetime import datetime, timedelta, timezone |
| 7 | +from datetime import datetime, timezone |
8 | 8 | from enum import Enum |
9 | 9 | from typing import Any, List, Optional, Sequence, TypeVar, Union |
10 | 10 |
|
@@ -185,6 +185,15 @@ def get_orchestration_state_by(self, |
185 | 185 | if max_instance_count is None: |
186 | 186 | # DTS backend does not behave well with max_instance_count = None, so we set to max 32-bit signed value |
187 | 187 | max_instance_count = (1 << 31) - 1 |
| 188 | + |
| 189 | + self._logger.info(f"Querying orchestration instances with filters - " |
| 190 | + f"created_time_from={created_time_from}, " |
| 191 | + f"created_time_to={created_time_to}, " |
| 192 | + f"runtime_status={[str(status) for status in runtime_status] if runtime_status else None}, " |
| 193 | + f"max_instance_count={max_instance_count}, " |
| 194 | + f"fetch_inputs_and_outputs={fetch_inputs_and_outputs}, " |
| 195 | + f"continuation_token={_continuation_token.value if _continuation_token else None}") |
| 196 | + |
188 | 197 | req = pb.QueryInstancesRequest( |
189 | 198 | query=pb.InstanceQuery( |
190 | 199 | runtimeStatus=[status.value for status in runtime_status] if runtime_status else None, |
@@ -295,6 +304,11 @@ def purge_orchestrations_by(self, |
295 | 304 | created_time_to: Optional[datetime] = None, |
296 | 305 | runtime_status: Optional[List[OrchestrationStatus]] = None, |
297 | 306 | recursive: bool = False) -> PurgeInstancesResult: |
| 307 | + self._logger.info("Purging orchestrations by filter: " |
| 308 | + f"created_time_from={created_time_from}, " |
| 309 | + f"created_time_to={created_time_to}, " |
| 310 | + f"runtime_status={[str(status) for status in runtime_status] if runtime_status else None}, " |
| 311 | + f"recursive={recursive}") |
298 | 312 | resp: pb.PurgeInstancesResponse = self._stub.PurgeInstances(pb.PurgeInstancesRequest( |
299 | 313 | instanceId=None, |
300 | 314 | purgeInstanceFilter=pb.PurgeInstanceFilter( |
@@ -356,7 +370,13 @@ def get_entities_by(self, |
356 | 370 | page_size: Optional[int] = None, |
357 | 371 | _continuation_token: Optional[pb2.StringValue] = None |
358 | 372 | ) -> List[EntityMetadata]: |
359 | | - self._logger.info(f"Getting entities") |
| 373 | + self._logger.info(f"Retrieving entities by filter: " |
| 374 | + f"instance_id_starts_with={instance_id_starts_with}, " |
| 375 | + f"last_modified_from={last_modified_from}, " |
| 376 | + f"last_modified_to={last_modified_to}, " |
| 377 | + f"include_state={include_state}, " |
| 378 | + f"include_transient={include_transient}, " |
| 379 | + f"page_size={page_size}") |
360 | 380 | query_request = pb.QueryEntitiesRequest( |
361 | 381 | query=pb.EntityQuery( |
362 | 382 | instanceIdStartsWith=helpers.get_string_value(instance_id_starts_with), |
|
0 commit comments