Hi Team, I created a custom block with some funct...
# prefect-community
Hi Team, I created a custom block with some functionality an registered the block on the UI. I made a few changes to the block and registered this block again but I am still seeing old functionality. So is there a way to delete an existing block from the workspace or to overwrite an existing block.(custom block)
The simplest potential fix is to try saving the block with
The full line would be:
block.save("my-block-name", overwrite=True)
you could also delete the block before creating it anew. You could do this in the cli like this:
prefect block type delete your-block-type-slug
🙌 2
perfect, thanks Mike
happy to help
gratitude thank you 1
is it normal that the overwrite=True parameter does not seem to update block attributes?
FYI, if the block was created with an older prefect version, when upgrading to 2.7.4, the changes will not be applied properly when overwriting. If the block was created with 2.7.4, the overwrite works.
What kind of block are you working with?
custom block
I upgraded and deleted the block so it works, but it's the kind of bug than can be bad if it happens again in the future (thinking the overwrite will overwrite the attributes) but it does not. At least with the latest version it works 🙂