Fix Beam Dataflow deferral without launcher job id - #72586
Conversation
500cc65 to
9410471
Compare
MaksYermak
left a comment
There was a problem hiding this comment.
@fat-catTW how did you check these changes? Because in the current time apache-beam-provider in the suspend state and all tests(unit, system) are disabled in the CI.
In the current time I am working on unsuspend beam provider in this PR. Also the fix for the issue, which you mentioned, was prepared by me in this PR and wait when beam provider will be unsuspend.
|
Thanks for pointing this out. I also reviewed #66952 and the existing fix in VladaZakharova#325. Although this PR takes a somewhat different approach, both changes address the same underlying issue. Since the existing work started earlier and is already coordinated with the Beam provider unsuspension, I’m converting this PR to draft and will leave the issue to that work. Please feel free to reference or reuse anything useful from this implementation, particularly the periodic job ID lookup while the launcher is still producing output, the synchronous fallback when no job ID can be resolved, and the additional Beam operator tests. Thanks for the clarification. |
Why
Beam Dataflow operators relied on Beam launcher logs to discover the Dataflow job id before deferring. When those logs omit the id, the deferrable path could pass
Noneinto the Dataflow trigger and fail instead of using the existing job-name based wait path.relates: #68279
Solution
Try to resolve the Dataflow job id by job name while the Beam launcher is still running. If the id is found, deferrable execution proceeds with a valid trigger job id. If the id still cannot be resolved, fall back to the synchronous
wait_for_donepath instead of deferring withNone.Was generative AI tooling used to co-author this PR?
[X]Yes (please specify the tool below)Generated-by: [Codex] following the guidelines
{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.