https://flyte.org logo
#ask-the-community
Title
# ask-the-community
k

Kamakshi Muthukrishnan

02/09/2023, 1:10 PM
#ask-the-community how to run the launch plan in remote ? i m trying with a simple hello world script to send email notification. import typing from flytekit import Email, FixedRate, LaunchPlan, PagerDuty, Slack, WorkflowExecutionPhase, task, workflow @task def say_hello() -> str: return "hello world" @workflow def my_wf() -> str: res = say_hello() return res my_notifying_launch_plan = LaunchPlan.get_or_create( name="my_notifying_lp", workflow=my_wf, notifications=[ Email( phases=[WorkflowExecutionPhase.SUCCEEDED], recipients_email=["kamakshi.muthukrishnan@outlook.com"], ), Slack( phases=[WorkflowExecutionPhase.SUCCEEDED, WorkflowExecutionPhase.FAILED, WorkflowExecutionPhase.ABORTED, WorkflowExecutionPhase.TIMED_OUT,], recipients_email=["XXXX@XXX.slack.com"], ) ], )
k

Kevin Su

02/09/2023, 7:01 PM
you want to use flytekit remote to create LP?
k

Kamakshi Muthukrishnan

02/09/2023, 11:13 PM
@Kevin Su - I am using pyflyte cli to run the workflow. I dont see the launchplan is getting created as dropdown in UI
k

Kevin Su

02/09/2023, 11:39 PM
how did you register the workflow, pyflyte run? If so, could you try pyflyte register instead?
k

Kamakshi Muthukrishnan

02/10/2023, 12:01 AM
@Kevin Su Using this to run the workflow .. pyflyte run --remote --service-account spark flyte/workflows/hi_world.py my_wf. I thought this is create a launch plan also
k

Kevin Su

02/10/2023, 12:03 AM
pyflyte run doesn’t register LP for now. we plan to support it in the future release.
k

Kamakshi Muthukrishnan

02/10/2023, 12:13 AM
how should i register launch plan then
k

Kevin Su

02/10/2023, 12:14 AM
you could use flytekit remote or use pyflyte register a workflow, pyflyte will register the LP
k

Kamakshi Muthukrishnan

02/10/2023, 12:15 AM
can you help me with the full syntax for LP
k

Kevin Su

02/10/2023, 12:16 AM
pyflyte register flyte/workflows/hi_world.py
k

Kamakshi Muthukrishnan

02/10/2023, 12:33 AM
@Kevin Su - Thank u. LP is reflecting when i see flytectl get launchplan -p flytesnacks -d development ..Then i did run the wf .. Looks like I m not doing something correctly here
it never triggered any email
M i missing anything ?
@Kevin Su Also where can i see the registered LP in UI
k

Kevin Su

02/10/2023, 12:35 AM
image.png
k

Kamakshi Muthukrishnan

02/10/2023, 12:38 AM
@Kevin Su - I am only seeing this
k

Kevin Su

02/10/2023, 12:39 AM
which version of flyteconsole you’re using
you can click top right button to see the version
k

Kamakshi Muthukrishnan

02/10/2023, 12:40 AM
image.png
k

Kevin Su

02/10/2023, 12:41 AM
it’s pretty old version
could you upgrade it
k

Kamakshi Muthukrishnan

02/10/2023, 12:41 AM
let me do it
k

Kevin Su

02/10/2023, 12:41 AM
you can also see the LP when you launch the workflow
k

Kamakshi Muthukrishnan

02/10/2023, 12:42 AM
i did run the workflow pyflyte run --remote --service-account spark hi_world.py my_wf
@Kevin Su dont see the launchplan being listed.. also it never triggered any email
k

Kevin Su

02/10/2023, 5:04 AM
launchplan isn’t listed after upgrading flyteconsole?
k

Kamakshi Muthukrishnan

02/14/2023, 3:04 PM
@Kevin Su Launch plan got upgraded after using the latest image. Just that it didnt trigger any email or slack notification
k

Kevin Su

02/14/2023, 6:42 PM
@Yee do we need additional setup to send email and slack notification?
k

Kamakshi Muthukrishnan

02/15/2023, 4:35 AM
@Yee @Kevin Su - any help here ?
@Kevin Su @Ketan (kumare3) @Samhita Alla.. Can I simply use latest tag for upgrading flyte ? or any specific version u suggest ?
s

Samhita Alla

02/16/2023, 4:28 AM
You can upgrade to the latest version. Can you share the LaunchPlan you created enabling email/Slack notification?
k

Kamakshi Muthukrishnan

02/16/2023, 4:30 AM
@Samhita Alla - I m not sure why the Propeller image is taking a different repo.. it is showing as flytepropeller: image: # -- Docker image for Flytepropeller deployment repository: pingsutw/flytepropeller # FLYTEPROPELLER_IMAGE tag: fcfce5e490382297e88e8f8c5ca02084acf6a4d8 # FLYTEPROPELLER_TAG pullPolicy: IfNotPresent
import typing from flytekit import Email, FixedRate, LaunchPlan, PagerDuty, Slack, WorkflowExecutionPhase, task, workflow @task def say_hello() -> str: return "hello world" @workflow def my_wf() -> str: res = say_hello() return res my_notifying_launch_plan = LaunchPlan.get_or_create( name="my_notifying_lp", workflow=my_wf, notifications=[ Email( phases=[WorkflowExecutionPhase.SUCCEEDED], recipients_email=["kamakshi.muthukrishnan@outlook.com"], ), Slack( phases=[WorkflowExecutionPhase.SUCCEEDED, WorkflowExecutionPhase.FAILED, WorkflowExecutionPhase.ABORTED, WorkflowExecutionPhase.TIMED_OUT,], recipients_email=["XXXX@XXX.slack.com"], ) ], )
s

Samhita Alla

02/16/2023, 4:33 AM
@Kevin Su, how should we change the FlytePropeller image?
Also, are notifications supported only on AWS? @Yee
k

Ketan (kumare3)

02/16/2023, 5:18 AM
You have to use sendgrid or something else on other platforms
Folks can integrate if they like
k

Kamakshi Muthukrishnan

02/16/2023, 5:30 AM
@Ketan (kumare3).. Sorry.. I tried to upgrade the propeller version alone . But now, i dont even see the Kubernetes or python task logs not coming up...Is there specific reason >.