flyteorg / flyte

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

[Core feature] Flyteadmin SMPT email publisher #5390

Open Future-Outlier opened 2 months ago

Future-Outlier commented 2 months ago

Motivation: Why do you think this is important?

When attending the community sync, engineers from Spotify mentioned that they want to save costs when sending emails, and that most big tech companies use the SMTP layer for their mail servers.

If we support an SMTP email publisher, we can help save a lot of money compared to using services like SendGrid, AWS, and GCP.

Goal: What should the final outcome look like, ideally?

We should support config like this.

notifications:
  type: SMTP
  emailer:
    emailServerConfig:
      apiKeyEnvVar: "SENDGRID_API_KEY"
    subject: "Notice: Execution \"{{ name }}\" has {{ phase }} in \"{{ domain }}\"."
    sender: "example@spotifiy.com"  # Consider using a generic email instead of personal
    body: >
      Execution \"{{ name }}\" has {{ phase }} in \"{{ domain }}\". View details at
      <a href=\http://example.com/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}>
      http://example.com/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}</a>. {{ error }}

Describe alternatives you've considered

We can definitely support, so there's no alternative.

Propose: Link/Inline OR Additional context

We can use docker-mail server to build a mail server with SMTP protocol locally, and try to implement it like sandbox email publisher.

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

Have you read the Code of Conduct?

Future-Outlier commented 2 months ago

Reply from Ketan: The problem is potential spam classification. We need to notify users to configure their mail server to avoid spam classification from SMTP provider.