elegant-toddler-67101
08/09/2023, 9:09 AMsome-grass-84903
08/09/2023, 9:14 AMglamorous-carpet-83516
08/09/2023, 10:34 PMelegant-toddler-67101
08/10/2023, 8:31 AMglamorous-carpet-83516
08/10/2023, 5:48 PMelegant-toddler-67101
08/20/2023, 8:20 AMwebhooknotifications
configuration for GCP so we can try it out?elegant-toddler-67101
08/20/2023, 8:21 AMglamorous-carpet-83516
08/21/2023, 10:05 PMexternalEvents:
enable: true
type: "gcp"
gcp:
projectId: "your-project"
eventsPublisher:
topicName: "gcp-topic"
eventTypes:
- all
webhooknotifications:
type: "gcp"
gcp:
projectId: "your-project"
webhooks:
name: slack
urlSecretName: slack
payload: "{{ name }} succeeded"
processor:
queueName: webhook
accountId: "590375264460"
Need to add it to flyteadmin config map, and you need to create a secret for webhook URL and token if neededglamorous-carpet-83516
08/21/2023, 10:19 PMcool-lifeguard-49380
08/22/2023, 7:41 AMcool-lifeguard-49380
08/22/2023, 8:04 AMlp = LaunchPlan.get_or_create(
notifications=[
Webhook(
name=<webhook_name>, # Should match the name in Flyte admin config map.
phases=[
WorkflowExecutionPhase.SUCCEEDED,
],
payload=["{{ name succeeded }}"],
),
],
)
What you wrote in the PR suggests that in the admin config map the platform team maintains a mapping from webhook name to webhook urls and the users choose one of the webhook names in the launch plan. This sounds very good to me.
In the future I’d also be very interested in being able to include a custom message in the notification (e.g. to tag responsible people on workflow failure but other people on workflow success) but this is not for this PR I guess:
lp = LaunchPlan.get_or_create(
notifications=[
Webhook(
name=<webhook_name>, # Should match the name in Flyte admin config map.
message="... some custom string ...", # <-----
phases=[
WorkflowExecutionPhase.SUCCEEDED,
],
payload=["{{ name succeeded }}"],
),
],
)
Edit: Or is payload exactly that? 🤔