Skip to content

Fix coroutine serialization error in PowerBIDatasetRefreshOperator#63829

Open
henry3260 wants to merge 1 commit intoapache:mainfrom
henry3260:fix-wait-for-completion
Open

Fix coroutine serialization error in PowerBIDatasetRefreshOperator#63829
henry3260 wants to merge 1 commit intoapache:mainfrom
henry3260:fix-wait-for-completion

Conversation

@henry3260
Copy link
Contributor

Why

When the PowerBIDatasetRefreshOperator is executed with wait_for_completion=False, it takes the synchronous "fire-and-forget" path. However, the underlying hook method trigger_dataset_refresh is an async function.

What

Forced Synchronous Execution: Wrapped the hook.trigger_dataset_refresh(...) call with asyncio.run(...) inside the wait_for_completion=False block. This ensures the async hook method executes fully within the current synchronous thread and returns the actual string ID.

closes: #63811

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@henry3260 henry3260 requested a review from dabla as a code owner March 17, 2026 14:37
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Mar 17, 2026
@henry3260
Copy link
Contributor Author

cc @morelgeorge

Copy link
Contributor

@SameerMesiah97 SameerMesiah97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you found the cause but I feel the fix might be at the wrong layer. Also, did you manage to reproduce the bug locally?

@henry3260
Copy link
Contributor Author

I think you found the cause but I feel the fix might be at the wrong layer. Also, did you manage to reproduce the bug locally?

Thanks for reviewing! Yes, I reproduced the error locally with the unit test.

@henry3260 henry3260 force-pushed the fix-wait-for-completion branch from 6978c2d to 8b7e0c8 Compare March 18, 2026 03:25
@henry3260 henry3260 force-pushed the fix-wait-for-completion branch from 8b7e0c8 to 0593eae Compare March 18, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:microsoft-azure Azure-related issues ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerBIDatasetRefreshOperator does not work when wait_for_completion = False

3 participants