Issue 135: Prune scheduling issue#136
Conversation
…heduling future to complete
There was a problem hiding this comment.
Pull request overview
Fixes Prefect prune scheduling race (Issue #135) by ensuring the prune-scheduling task fully completes (and the scheduled flow run is created) before the calling flow/task can finish, preventing “Execution was cancelled by the runtime environment” from aborting scheduling.
Changes:
- Block on the
schedule_prefect_flow.submit(...)future inGlobusPruneController.prune()viafuture.result()to guarantee scheduling completes. - Use Prefect’s run logger (
get_run_logger) inFileSystemPruneController.prune()for Prefect-context logging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR addresses issue #135, where a flow that uses the prune controller "completes" before pruning is actually scheduled, resulting in a
Execution was cancelled by the runtime environment.Now in GlobusPruneController, I have wrapped the
schedule_prefect_flowcall that will block until the future result is returned, to ensure that the flow does not complete until pruning is scheduled: