shreyas-dev commented on code in PR #60369:
URL: https://github.com/apache/airflow/pull/60369#discussion_r2700818580
##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/powerbi.py:
##########
@@ -65,6 +65,7 @@ class PowerBIDatasetRefreshOperator(BaseOperator):
:param check_interval: Number of seconds to wait before rechecking the
refresh status.
:param request_body: Additional arguments to pass to the request body, as
described in
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/refresh-dataset-in-group#request-body.
+ :param wait_for_termination: If True, wait for the dataset refresh to
complete. If False, trigger the refresh and return immediately without waiting.
Review Comment:
Hey @eladkal, I completely agree that having both wait_for_termination and
deferrable parameters would provide better flexibility. However, I've realized
that implementing this properly would require some significant refactoring:
1. The PowerBIHook class is currently fully async, with methods like
trigger_dataset_refresh() and get_refresh_details_by_refresh_id() being async
2. To support synchronous waiting (wait_for_termination=True,
deferrable=False), we'd need to either:
- Add synchronous wrapper methods to the hook
- Redesign parts of the hook to support both sync and async patterns. This
would also impact the trigger implementation.
I'd like to propose handling this as a separate feature enhancement in a
follow-up PR and keep this as just `wait_for_termination` feature
implementation as the original title suggested. If I get little bit of time
I'll work on it in the next couple of days and raise another PR. It's up to you
guys to decide.
--
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]