omar-massfih commented on code in PR #74600:
URL: https://github.com/apache/airflow/pull/74600#discussion_r4270009474


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/powerbi.py:
##########
@@ -42,9 +43,11 @@ class PowerBIDatasetRefreshStatus:
     FAILED = "Failed"
     COMPLETED = "Completed"
     DISABLED = "Disabled"
+    TIMED_OUT = "TimedOut"
+    CANCELLED = "Cancelled"
 
-    TERMINAL_STATUSES = {FAILED, COMPLETED}
-    FAILURE_STATUSES = {FAILED, DISABLED}
+    FAILURE_STATUSES = {FAILED, DISABLED, TIMED_OUT, CANCELLED}
+    TERMINAL_STATUSES = FAILURE_STATUSES | {COMPLETED}

Review Comment:
   Restored the original ordering: `TERMINAL_STATUSES` comes first, and 
`FAILURE_STATUSES` is derived by subtracting `Completed`.



##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/powerbi.py:
##########
@@ -159,6 +164,9 @@ def raw_to_refresh_details(cls, refresh_details: dict) -> 
dict[str, str]:
             ),
             PowerBIDatasetRefreshFields.ERROR.value: 
str(refresh_details.get("serviceExceptionJson")),
         }
+        if refresh_details.get("refreshType") == "ViaEnhancedApi":

Review Comment:
   Added `PowerBIHook.VIA_ENHANCED_API`. Normalization now always returns 
`refresh_type`, including `"None"` when absent, and execution results retain 
the history refresh type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to