HomeSoftware Heritage

Instanciate the SMTP class only when needed

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Instanciate the SMTP class only when needed

instead of creating it in the VaultBackend constructor: when configured
(with host and port), SMTP.connect() is immediately called, which makes
it mandatory to have the smtp server up and running to be able to create
the VaultBackend object (which makes it hard to run properly in an elastic
environment like docker or k8s).

This also removes the fallback to hardcoded 'localhost:25' smtp server;
if the smtp server is not configured or not reachable, the call to
_smtp_send() will fail logging the failure (both in logging and sentry).

Details

Provenance
douarddaAuthored on Aug 5 2022, 7:16 PM
douarddaPushed on Sep 14 2022, 4:26 PM
Differential Revision
D8205: Instanciate the SMTP class only when needed
Build Status
Buildable 31531
Build 49324: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.