philip
05/23/2024, 4:52 AM@flow(
name=FLOW_NAME,
persist_result=True,
result_storage=S3.load("s3-flow-storage"),
result_serializer=JSONSerializer(),
)
def aggregate_events():
logic()
When trying to simply create a block in the Prefect test fixture, Prefect doesn't recognize this block's existence, resulting in the error `Unable to find block document named s3-flow-storage for block type s3`:
@pytest.fixture(autouse=True, scope="session")
def prefect_fixture():
with prefect_test_harness():
S3(bucket_path="bucket").save("s3-flow-storage")
When trying to disable result persistence dynamically in the test, it seems to have no effect (same error as above):
aggregate_events.with_options(result_storage=None, persist_result=False)()
Am I missing something? How does one go about this? Appreciate the help!