You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
address review feedback: use EventsClient directly, pass params, inline serialization
This commit addresses PR review comments #1-4 and implements the requested change from comment #5:
1. Keep reserved keywords (like 'requires') in serialized inputs ✅
2. Use `get_events_client(checkpoint_every=1)` directly instead of `emit_event` to avoid buffering issues ✅
3. Pass `flow_run` and `logger` as parameters instead of using context ✅
4. Inline step serialization logic directly in `run_steps` ✅
5. Emit **one event per step** instead of one aggregate event ✅
Changes:
- Removed `_EnvironmentRunContext` class and tests (over-engineered)
- Read `flow_run_id` directly from `os.getenv("PREFECT__FLOW_RUN_ID")`
- Changed from single aggregate event to individual events per step:
- `prefect.flow-run.pull-step.executed` for each successful step
- `prefect.flow-run.pull-step.failed` when a step fails
- Updated all tests to expect one event per step
- Event payload now contains individual step data (index, qualified_name, step_name, id, inputs)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments