https://prefect.io logo
n

Nick Coy

08/29/2022, 4:41 PM
Hello, I am testing out prefect 2.0 and I have a GCS remote storage block enabled for a deployment. When I start an agent and then run the flow from the cloud I keep getting this warning
UserWarning: Block document has schema checksum sha256:dbeeaf09aa78947a7c576549b11e098c00a25bcbbf90b8d8b70c0c3a3fc8f4a2 which does not match the schema checksum for class 'Process'. This indicates the schema has changed and this block may not load.
When I go to the bucket I see the flow files there and the flow runs fine.
1
j

John Kang

08/29/2022, 4:50 PM
@Nick Coy I'm curious what the answer is as well because I just created a simple string block with an email address this morning and the first time (and every subsequent time) I obtain the block from the server I receive the same warning:
C:\ProgramData\Anaconda3\envs\Capacity_venv\lib\site-packages\prefect\blocks\core.py:584: UserWarning: Block document has schema checksum sha256:bbe0047b3c6d29934661cfe37572a51ff59775ea0eab335b7ad21c964a5e5800 which does not match the schema checksum for class 'String'. This indicates the schema has changed and this block may not load.return cls._from_block_document(block_document)
n

Nate

08/29/2022, 5:32 PM
This warning can be safely ignored for the time being. It just means that the implementation of the Block (whether the
String
or
Process
Block type) has been changed and the workspace is still expecting the checksum based on the originally registered Block implementation. We'll be tweaking the block registration process in upcoming releases to suppress this warning, as it doesn't reflect any wrongdoing on the user side. Sorry about the confusing warning!
👍 2
upvote 1
n

Nick Coy

08/29/2022, 5:36 PM
Great, thanks for the response!
j

John Kang

08/29/2022, 5:38 PM
@Nate Thanks for the feedback. Curious how it works because I just implemented the block in the UI online and then immediately tried using it in PyCharm and I received the error. I'm on 2.2.0 and received the error.
n

Nate

08/29/2022, 6:19 PM
@John Kang for context, when I refer to a Block "implementation", I don't mean a specific instance of that block in the UI. I mean a specific version of the Block
class
, for example if we have some file
blocks.py
with a block implementation:
Copy code
from prefect.blocks.core import Block

class MyBlock(Block):

    value: Any
if I run
prefect block register -f blocks.py
then this version of
MyBlock
will be registered with the active Prefect Cloud workspace and a checksum is calculated on this specific implementation then if I change the implementation of
MyBlock
:
Copy code
from prefect.blocks.core import Block

class MyBlock(Block):

    value: Any
    new_field: str = "some new string field with a default value!"
and if I ran
prefect block register -f blocks.py
again, it would calculate a new checksum on this implementation because of the
new_field
we added will change the schema of the block in the case of
String
and
Process
, we have been refactoring / re-registering these blocks on a running basis and haven't yet suppressed that misleading warning, so that's why you're seeing that - hopefully that's clear.
🙏 1
j

John Kang

08/29/2022, 6:26 PM
OH got it. Thanks for the heads up @Nate
👍 1
3 Views