https://prefect.io logo
Title
t

Ton Steijvers

03/21/2023, 11:04 AM
I'm using Automation to trigger an action if a flow-run with a certain tag is executed. I set Trigger type = Flow run state, Flows = All Flows, Flow Run Tags = local and Flow Run = Enters Any state. The name of my tag is "local". The automation works if I create a deployment for my flow and start flow runs from there. However, if I start a flow run locally then this automation does not trigger. Is that expected? The main body of my flow is this:
if __name__ == "__main__":
    with tags("local"):
        my_flow()
In the UI I can see all flow runs, whether run through the deployment or locally. All have the required "local" tag assigned to it. I tried removing the tag from the automation and select my flow name instead. Then the automation works both when run as a deployment and when run locally. Is this a known issue or limitation in using tags for an automation?
w

Will Raphaelson

03/21/2023, 2:12 PM
hi @Ton Steijvers would you please open an issue the prefect repository with any other reproduction steps and we’ll get right on it.
👍 1