You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromprefect.blocks.coreimportBlockfromprefect.testing.utilitiesimportprefect_test_harnesswithprefect_test_harness():
classMyBlock(Block):
setting_1: str="foo"blk1=MyBlock(setting_1="bar")
blk1.save("a-block")
# redefining the block with a new schemaclassMyBlock(Block):
setting_2: float=1blk2=MyBlock(setting_2=0.5)
blk2.save("a-block", overwrite=True)
blk3=MyBlock.load("a-block")
print(blk3.setting_1) # old data still accessibleprint(blk3.setting_2)
when running the above code to simulate an update of a blocks schema, I can still access the old data from the previous schema after "migration". This is quite unexpected.
our current workaround is to delete the old block entirely before creating the new one.
Bug summary
when running the above code to simulate an update of a blocks schema, I can still access the old data from the previous schema after "migration". This is quite unexpected.
our current workaround is to delete the old block entirely before creating the new one.
Version info (
prefect version
output)Additional context
No response
The text was updated successfully, but these errors were encountered: