Hi, I have been trying to configure a trigger base...
# ask-metaflow
f
Hi, I have been trying to configure a trigger based on another flow but I keep getting this error when trying to create the flow. For more details please see the 🧵
Copy code
Argo Workflows error:
    An Argo Event Source name hasn't been configured for your deployment yet. Please see this article for more details on event names - <https://argoproj.github.io/argo-events/eventsources/naming/>. You can configure it by executing `metaflow configure kubernetes` or setting METAFLOW_ARGO_EVENTS_EVENT_SOURCE in your configuration. If in doubt, reach out for support at <http://chat.metaflow.org>
I am on metaflow 2.9.5
Copy code
"""This will trigger another flow."""
from metaflow.decorators import step
from metaflow.flowspec import FlowSpec
from metaflow.parameters import Parameter


class TriggerFlow(FlowSpec):
    @step
    def start(self):
        print("triggered step")
        self.output = "output from TriggerFlow"
        self.next(self.join)

    @step
    def join(self):
        self.next(self.end)

    @step
    def end(self):
        print("end")


if __name__ == "__main__":
    TriggerFlow()
Copy code
"""Triggered by TriggerFlow."""
from metaflow import trigger_on_finish, current
from metaflow.decorators import step
from metaflow.flowspec import FlowSpec
from metaflow.parameters import Parameter


@trigger_on_finish(flow="TriggerFlow")
class SkipFlow(FlowSpec):
    @step
    def start(self):
        print(current.trigger.run.data.output)
        self.next(self.middle)

    @step
    def middle(self):
        print("middle step")
        self.next(self.join)

    @step
    def join(self):
        self.next(self.end)

    @step
    def end(self):
        print("end")


if __name__ == "__main__":
    SkipFlow()
s
did you install argo events controller and event bus inside your kubernetes cluster?
f
yes
s
and did you do
metaflow configure kubernetes
after that to specify your config for events?
f
yeah I think I have. What should I look for in my config? Sorry I just took over this metaflow infrastructure and haven't had enough time to dig deep into to understand all these settings. Thank you for patiently answering the questions.
s
No worries. Can you share the contents of
~/.metaflowconfig/config.json
?
f
Copy code
"METAFLOW_DATASTORE_SYSROOT_S3": "<s3_bucket>",
"METAFLOW_DATATOOLS_S3ROOT": "<s3_bucket>",
"METAFLOW_DEFAULT_DATASTORE": "s3", 
"METAFLOW_DEFAULT_METADATA": "service",
"METAFLOW_KUBERNETES_NAMESPACE": "default",
"METAFLOW_KUBERNETES_SECRETS": "pod-default-envs",
"METAFLOW_KUBERNETES_SERVICE_ACCOUNT": "argo-workflow",
"METAFLOW_SERVICE_AUTH_KEY": "<AUTH_KEY>",
"METAFLOW_SERVICE_URL": "https://<url>/api/"