Skip to content

handle heartbeat event in wait_for_flow_run #17930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2025
Merged

handle heartbeat event in wait_for_flow_run #17930

merged 3 commits into from
Apr 28, 2025

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Apr 28, 2025

closes #17929

we are subscribing to all flow run events, which makes sense

    event_filter = EventFilter(
        event=EventNameFilter(prefix=["prefect.flow-run"]),
        resource=EventResourceFilter(id=[f"prefect.flow-run.{flow_run_id}"]),
    )

but we were assuming that the only type of flow run events would be state changes, which is not true at this point

                state_type = StateType(event.resource["prefect.state-type"])

@github-actions github-actions bot added the bug Something isn't working label Apr 28, 2025
Copy link

codspeed-hq bot commented Apr 28, 2025

CodSpeed Performance Report

Merging #17930 will not alter performance

Comparing handle-heartbeat (3f4cb8e) with main (1b73766)

Summary

✅ 2 untouched benchmarks

@zzstoatzz zzstoatzz marked this pull request as ready for review April 28, 2025 16:09
@desertaxle
Copy link
Member

Can you add a regression test?

@zzstoatzz
Copy link
Collaborator Author

@desertaxle added in 3f4cb8e

@zzstoatzz zzstoatzz merged commit 048218b into main Apr 28, 2025
50 of 51 checks passed
@zzstoatzz zzstoatzz deleted the handle-heartbeat branch April 28, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefect deployment run with --watch flag fails if heartbeats are enabled
2 participants