fast-vr-44972
05/15/2024, 5:22 PMproject decorator.
We have something like as below. When we publish the data_event it seems to trigger all the variant of the CustomFlow not just the production one. We have deployed flow with --production option and then there are some other variants. We only want to trigger the production one. Is this possible to achieve?
@trigger(event="data_split")
@project(name="data")
class CustomFlow(FlowSpec):
....limited-tomato-18674
05/15/2024, 5:46 PMdata_split event coming from?limited-tomato-18674
05/15/2024, 5:47 PMfast-vr-44972
05/15/2024, 6:03 PMArgoEvent from outside of the flow.limited-tomato-18674
05/15/2024, 6:09 PMArgoEvent(name='foo').publish() is not project/branch specific. In this case, I would recommend that on your production branch you use something like @trigger(data.prod.data_split) and for triggering do ArgoEvent(name='data.prod.data_split').publish()
This way none of your other custom branches would get triggered by this external event. However, this does require you to manually manage the prefixed name of the events.
Is that something that works in your case?fast-vr-44972
05/15/2024, 9:05 PMlimited-tomato-18674
05/15/2024, 9:23 PMDataSplitNotifierFlow that has a @trigger(event="data_split"). You can then deploy this notifier flow only to the branches on which you want to trigger CustomFlow.
Then you can annotate CustomFlow with @trigger_on_finish(flow='DataSplitNotifierFlow'). @trigger_on_finish is project/branch specific, so DataSplitNotifierFlow executing in prod will only trigger CustomFlow in prod. This way you can manage which branches of `CustomFlow`get triggered by only deploying DataSplitNotifierFlow to those specific branches.
Is this something that can potentially be useful for you?