-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Apache Airflow Provider(s)
microsoft-azure
Versions of Apache Airflow Providers
apache-airflow-providers-microsoft-azure==11.1.0
Apache Airflow version
2.10.2
Operating System
linux
Deployment
Google Cloud Composer
Deployment details
No response
What happened
We use the operator PowerBIDatasetRefreshOperator to refresh our PowerBI datasets. Sometimes, the task quickly fails with the following error:
airflow.exceptions.AirflowException: An error occurred: Unable to fetch the details of dataset refresh with Request Id: <request id>
However, on PowerBI side, the dataset is refreshed (timezone GMT+1, both the time in the refresh and the log are about the same):

If I understand correctly, this corresponds to an error in this function, which may mean that there was an error when trying to fetch the refresh status, even though the refresh was running. Maybe the error comes from the request to the Microsoft API, which could be improved with a retry (but we did not test for the moment).
What you think should happen instead
The task should succeed. (since the dataset refresh suceeded)
How to reproduce
On our side, we use the following configuration.
refresh_powerbi_dataset_success = PowerBIDatasetRefreshOperator(
task_id="refresh_powerbi_dataset_success",
conn_id="our-conn-id",
dataset_id="our-dataset-id",
group_id="our-group-id",
)The dataset ID and group ID correspond to valid PowerBI dataset and workspace.
Anything else
This bug occurs about once every 3 task runs (the task fails but the refresh succeeds). Sometimes if fails several times in a row then works again, other times it works on the first run. I think this should mean that the configuration is good (since the operator often works fine).
I haven't been able to identify any specific pattern.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct