Open indigoviolet opened 6 days ago
Thanks for the bug report @indigoviolet! Your analysis that just checking for $ref
is too general. We should be looking for dictionaries that match this shape when loading block document references:
{
"$ref": {
"block_document_id": <UUID>
}
}
Do you want to submit a PR for a bug fix since you've already found where the fix needs to go?
@desertaxle That shape doesn't seem to be a complete specification based on the current logic in Block.load_from_ref
:
for example, data[$ref]
can be a string, UUID, or {'block_document_id': str | UUID}
or {'block_document_slug': <something else>}
.
Do you have a suggestion for how to handle this?
Bug summary
This will fail because of https://github.com/PrefectHQ/prefect/blob/cd4994ce81a476da575348b286bb62ce50603a89/src/prefect/flows.py#L537
It seems to me that this block loading code is casting too wide a net with
$ref
? or not encoding blocks in a specific-enough way?Version info (
prefect version
output)Additional context
No response