Possible UI Bug When Updating Blocks

I am creating a custom trigger for a deployment and I want this deployment to run any time a certain json block is saved to. So like this (with the block name “fake-json-block”

“match”: {
“prefect.resource.name”: “fake-json-block”
“match_related”: {},
“after”: ,
“expect”: [
“for_each”: ,
“posture”: “Reactive”,
“threshold”: 1,
“within”: 0

This trigger works when the block is saved to using a command like

from prefect.blocks.system import JSON
JSON(value=[1,5,7]).save("fake-json-block", overwrite=True)

I.E I am seeing an even corresponding to that update in the event log. However, if I update the block “fake-json-block” value in the UI and save there

I am not seeing any corresponding update event of the block in the event log. Is this behavior intentional? I’d definitely like to see this behavior reflected in the event log.

Hey Kyle, this is an interesting case. We generate events on any block method call in the python client. We don’t emit corresponding events when the UI makes those API calls to change block values. That said, I think there may actually be better ways to achieve what you’re trying to do - can I ask you to DM me and we can chat on it real quick?

Yeah I would be happy to DM you and get a separate chat going – How exactly do you want to do that? I didnt see any way to DM you directly in this discourse.

In the slack community, where i also saw you post. I responded to your thread!

1 Like