Page MenuHomeSoftware Heritage

Instanciate the SMTP class only when needed
Needs ReviewPublic

Authored by douardda on Fri, Aug 5, 7:21 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

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).

Event Timeline

Build is green

Patch application report for D8205 (id=29604)

Rebasing onto ca71a59eda...

Current branch diff-target is up to date.
Changes applied before test
commit 18c958a42ba69823e93788e3c81e07b66311dbf5
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Aug 5 19:16:21 2022 +0200

    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).

See https://jenkins.softwareheritage.org/job/DVAU/job/tests-on-diff/250/ for more details.