ancient-wolf-19325
06/29/2024, 1:02 AMconfig-sandbox.yaml).
notifications:
type: sandbox
emailer:
emailServerConfig:
serviceName: sendgrid
apiKeyEnvVar: SENDGRID_API_KEY
subject: "Notice: Execution \"{{ workflow.name }}\" has {{ phase }} in \"{{ domain }}\"."
sender: "flyte-notifications@company.com"
body: >
Execution \"{{ workflow.name }} [{{ name }}]\" has {{ phase }} in \"{{ domain }}\". View details at
<a href="http://flyte.company.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}">
http://flyte.company.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}</a>. {{ error }}
2. For AWS Environment:
- Set up an SNS topic and an SQS queue, and configure a verified SES email address.
notifications:
type: "aws"
region: "us-east-1"
publisher:
topicName: "arn:aws:sns:us-east-1:{{ YOUR ACCOUNT ID }}:{{ YOUR TOPIC }}"
processor:
queueName: "{{ YOUR QUEUE NAME }}"
accountId: "{{ YOUR ACCOUNT ID }}"
emailer:
subject: "Notice: Execution \"{{ workflow.name }}\" has {{ phase }} in \"{{ domain }}\"."
sender: "flyte-notifications@company.com"
body: >
Execution \"{{ workflow.name }} [{{ name }}]\" has {{ phase }} in \"{{ domain }}\". View details at
<a href="http://flyte.company.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}">
http://flyte.company.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}</a>. {{ error }}
For Slack notifications, you need to configure the notifications in your Flyte platform and specify them in your launch plan:
1. Configure Notifications in Flyte Platform:
- In your Helm chart configuration, add the following:
workflow_notifications:
enabled: true
config:
notifications:
type: slack
slack:
url: <slack-webhook-url>
2. Specify Notifications in Launch Plan:
from flytekit import Slack, WorkflowExecutionPhase, LaunchPlan, workflow, task
@task
def my_task():
...
@workflow
def my_workflow():
my_task()
my_launch_plan = LaunchPlan.get_or_create(
workflow=my_workflow,
notifications=[
Slack(ancient-wolf-19325
06/29/2024, 1:02 AM>>```phases=[WorkflowExecutionPhase.SUCCEEDED, WorkflowExecutionPhase.FAILED], recipients_email=["my-channel@slack.com"], ) ], ) ``` Sources: - Flyte Notifications Configuration - Flyte Deployment Notifications - Flyte Discuss on Slack Notifications Slack Link https://flyte-org.slack.com/archives/CP2HDHKE1/p1719622919.153569 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.