Hi, we are trying to publish an argo event from in...
# ask-metaflow
f
Hi, we are trying to publish an argo event from inside a python script which isn't a flow following the instructions in the doc
Copy code
from metaflow.integrations import ArgoEvent

ArgoEvent(name="data_updated").publish()
It's unable to publish it. We have the correct metaflow and kube config since we can deploy/trigger a flow and can also publish an event from inside the flow. I suppose it's not able to find the necessary env vars. How can we fix it?
1
l
What error are you getting?
f
Copy code
Unable to publish Argo Event (test_send_extra_var): <urlopen error [Errno -2] Name or service not known>
I also copy pasted the
METAFLOW_ARGO_EVENTS_WEBHOOK_URL
as the
url
argument and it still throws the same error
Copy code
ArgoEvent(name="test_send_extra_var",
        url=<METAFLOW_ARGO_EVENTS_WEBHOOK_URL>).publish(
    payload={'dataset_versions': "1,2", "foo": "not_needed"})
l
Are you trying to run this script locally or from inside the cluster?
f
Locally
l
Ah, I see. Is your webhook URL an internal k8s service or is it available over the public internet?
f
Good question! I suppose it needs to be available over public internet for this to work?
l
Yes
f
Yeah it's a private k8s service.