Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow namespacing of ArgoEvent when published from a step #1781

Open
ob-uk opened this issue Mar 27, 2024 · 0 comments
Open

Allow namespacing of ArgoEvent when published from a step #1781

ob-uk opened this issue Mar 27, 2024 · 0 comments

Comments

@ob-uk
Copy link

ob-uk commented Mar 27, 2024

Currently the events that @trigger_on_finish depends on are namespaced with a scheme such as project.branch.flow.Event. This is neat because when I want to specify a dependency between flows, I can separate them by project/branch so that a flow on a particular branch is triggered by an upstream flow also in that branch.

This functionality does not exist for the ArgoEvent object (and @trigger). Therefore if someone has some conditional triggering logic such as:

@step
def my_logic(self): 
   if this_condition_true: 
       ArgoEvent('condition_true').publish()
   else: 
       ArgoEvent('condition_false').publish() 
   self.next(self.end)

Then they'd have to have custom logic to construct the event name based on the project and branch. At the same time, the downstream flow's @trigger would need to have specific event names constructed by the user to make sure they're only triggered by events in that namespace.

It would be great to introduce options like ArgoEvent(..., namespaced = True) and @trigger(..., namespaced = True) so that the users don't need to know how Metaflow internally constructs events and they can get the guarantee of namespace level isolation.

For users using this functionality from an external system (not a Metaflow flow), they can disable namespacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant