OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Email settings not picked up when set through environment variables

Open jan-pieter opened this issue 1 year ago • 5 comments

Affected module Backend

Describe the bug When using environment variables to supply the email configuration the values are not picked up by the backend. No emails are being sent and the UI shows emails being disabled.

To Reproduce

Set the following environment variables:

  • OM_EMAIL_ENTITY
  • OM_SUPPORT_URL
  • AUTHORIZER_ENABLE_SMTP (to true)
  • OPENMETADATA_SERVER_URL
  • SMTP_SERVER_ENDPOINT
  • SMTP_SERVER_PORT
  • SMTP_SERVER_USERNAME
  • SMTP_SERVER_PWD
  • SMTP_SERVER_STRATEGY
  • OPENMETADATA_SMTP_SENDER_MAIL

Next, configure an alert and trigger an action that would send out an email. No email is sent. Also, check the Email settings in the UI; the settings configured through environment variables are not present.

Expected behavior Email being sent

Version:

  • OpenMetadata version: 1.1.4

Additional context When configuring the email settings through the UI it does work.

jan-pieter avatar Sep 19 '23 13:09 jan-pieter

@jan-pieter please use the Settings -> OpenMetadata -> Email to configure the email settings. @mohityadav766 are we still supporting env variables to configure email?

harshach avatar Sep 20 '23 05:09 harshach

Hi - I was facing the same situation and was about to create a new issue for this.

The environment variables seem to be generated by the helm chart: https://github.com/open-metadata/openmetadata-helm-charts/blob/main/charts/openmetadata/templates/secrets.yaml#L121-L140

Question is if this should simple be removed from the helm chart, with the reference to set this via UI only @harshach?

/edit: Sending mails via the settings from the UI works perfectly fine in 1.3.0.

Cheers, @cberge908

cberge908 avatar Feb 27 '24 17:02 cberge908

As per discussion, we are going to add a option to sync the Email Settings, and use operation script to invoke the sync process to the DB from the ENV VARS set. cc @harshach @tutte

mohityadav766 avatar Apr 16 '24 13:04 mohityadav766

Would this be a bi-directional sync or would the ENV vars overwrite the settings made in the UI previously (or vice-versa)?

cberge908 avatar Apr 16 '24 13:04 cberge908

Hi, is there any update for this issue?

datapopcorn avatar Jun 18 '24 04:06 datapopcorn