Centralize work-pool result storage eligibility#21044
Draft
Centralize work-pool result storage eligibility#21044
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR centralizes the rule that decides when a work-pool result storage default is allowed to apply for ad-hoc submission.
This is a small phase-1 Storage Defaults cleanup. Work-pool result storage is the only partial default layer we have today, and the project needs its precedence rule to be predictable before we add workspace or server defaults.
details
prefect.resultsfor one shared question: does this flow already have result storage configured in a way that works for remote result retrieval?InfrastructureBoundFlow.submit_to_work_pool()andBaseWorker._submit_adhoc_run()Why this matters for the project:
Tests:
uv run pytest tests/results/test_result_store.py -k "RemoteResultStorageConfiguration or update_for_flow"uv run pytest tests/test_infrastructure_bound_flow.py -k "test_submit_uses_work_pool_result_storage_block or test_submit_to_work_pool_does_not_override_explicit_flow_result_storage"uv run pytest tests/workers/test_base_worker.py -k "test_submit_uses_work_pool_result_storage_block or test_submit_does_not_override_explicit_flow_result_storage"uv run ruff check src/prefect/results.py src/prefect/flows.py src/prefect/workers/base.py tests/results/test_result_store.py