<#CP2HDHKE1|> how to run the launch plan in remote...
# flyte-support
r
#CP2HDHKE1 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"], ) ], )
g
you want to use flytekit remote to create LP?
r
@glamorous-carpet-83516 - I am using pyflyte cli to run the workflow. I dont see the launchplan is getting created as dropdown in UI
g
how did you register the workflow, pyflyte run? If so, could you try pyflyte register instead?
r
@glamorous-carpet-83516 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
g
pyflyte run doesn’t register LP for now. we plan to support it in the future release.
r
how should i register launch plan then
g
you could use flytekit remote or use pyflyte register a workflow, pyflyte will register the LP
r
can you help me with the full syntax for LP
g
pyflyte register flyte/workflows/hi_world.py
r
@glamorous-carpet-83516 - 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 ?
@glamorous-carpet-83516 Also where can i see the registered LP in UI
g
message has been deleted
r
@glamorous-carpet-83516 - I am only seeing this
g
which version of flyteconsole you’re using
you can click top right button to see the version
r
message has been deleted
g
it’s pretty old version
could you upgrade it
r
let me do it
g
you can also see the LP when you launch the workflow
r
i did run the workflow pyflyte run --remote --service-account spark hi_world.py my_wf
@glamorous-carpet-83516 dont see the launchplan being listed.. also it never triggered any email
g
launchplan isn’t listed after upgrading flyteconsole?
r
@glamorous-carpet-83516 Launch plan got upgraded after using the latest image. Just that it didnt trigger any email or slack notification
g
@thankful-minister-83577 do we need additional setup to send email and slack notification?
r
@thankful-minister-83577 @glamorous-carpet-83516 - any help here ?
@glamorous-carpet-83516 @freezing-airport-6809 @tall-lock-23197.. Can I simply use latest tag for upgrading flyte ? or any specific version u suggest ?
t
You can upgrade to the latest version. Can you share the LaunchPlan you created enabling email/Slack notification?
r
@tall-lock-23197 - 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"], ) ], )
t
@glamorous-carpet-83516, how should we change the FlytePropeller image?
Also, are notifications supported only on AWS? @thankful-minister-83577
f
You have to use sendgrid or something else on other platforms
Folks can integrate if they like
r
@freezing-airport-6809.. 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 >.
155 Views