flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.81k stars 661 forks source link

[BUG] Flyte-Binary Helm chart email notifications don't behave as expected #4024

Open peterklingelhofer opened 1 year ago

peterklingelhofer commented 1 year ago

Describe the bug

Myself and another user both seem to be running into an issue with template literals when attempting to add notifications inline in the flyte-binary helm chart (going off of the Workflow Notifications section in the docs. Here's the Slack thread which details what's occurring: https://discuss.flyte.org/t/14164511/hi-we-are-trying-to-implement-workflow-slack-notifications-w

We see this error when attempting to use workflow in a template literal (the same is true of name): parse error at (flyte-binary/templates/deployment.yaml:4): function "workflow" not defined. Interestingly, when we don't use template literals, we can build the helm chart successfully and receive notifications, but they come back with this subject: flyteidl.admin.EmailNotification (not using the subject we've inputted), and with the body combining these values all into a base64-encoded string: "<mailto:email@address.com|email@address.com>"email@address.comhi this is the email subject"hi this is the email body.

Unfortunately, we don't need the extra infrastructure of flyte-core, so we were hoping to get this working with the flyte-binary chart. In the meantime, I would be very appreciative if anyone has an example of a helm chart for Flyte Binary that has successfully gotten notifications working with the template literals from the example in the docs. Perhaps if there is no immediately obvious solution we can hope the webhooks PR is merged soon: https://github.com/flyteorg/flyteadmin/pull/583

Expected behavior

Expect the helm chart to build with template literals successfully, so we can see which workflows are failing.

Additional context to reproduce

configuration:
  inline:
    notifications:
      type: "aws"
      region: "us-east-1"
      publisher:
        topicName: "arn:aws:sns:us-east-1:#########:some-name"
      processor:
        queueName: "some-name"
        accountId: "#########"
      emailer:
        sender: "email@address.com"
        subject: "hi this is the email subject"
        body: "hi this is the email body"

Yields this in the inline yaml:

configuration:
  inline:
    notifications:
      type: "aws"
      region: "us-east-1"
      publisher:
        topicName: "arn:aws:sns:us-east-1:#########:some-name"
      processor:
        queueName: "some-name"
        accountId: "#########"
      emailer:
        sender: "<mailto:email@address.com|email@address.com>"
        subject: "hi this is the email subject"
        body: "hi this is the email body"

Screenshots

No response

Are you sure this issue hasn't been raised already?

Have you read the Code of Conduct?

github-actions[bot] commented 5 months ago

Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable. Thank you for your contribution and understanding! 🙏

peterklingelhofer commented 5 months ago

Solution via escaping brackets here in the new thread: https://flyte-org.slack.com/archives/CP2HDHKE1/p1695826300502159