Skip to content

Move email templates and sraa config to disk #583

@phavekes

Description

@phavekes

Currently, the email templates used for emails to users are stored in the database during a push to https://{{ middleware_vhost_name }}/management/configuration. Since these change only rarely, we are moving them to disk.

Rationale:

  • We've added the option to push the middleware config from manage (Add Openconext-Stepup config OpenConext-manage#627). We do not want the manage the email templates from there because they rarely change.
  • This reduces the size of the push (in the event stream).
  • The SRAA config is stored in parameters.yaml
  • The email twig templates are stored in /config/openconext/email_templates/, one file for each template.
  • Default twig email templates are included in the repo and the tars, which can be overwritten during (Ansible) deployment. Use the current templates included in devconf as default: https://github.com/OpenConext/OpenConext-devconf/blob/main/stepup/middleware/middleware-config.json#L7-L44
  • The new versions of middleware uses the templates from disk, the values in the database are ignored. I.e. email templates are still allowed in the push and the database, but are ignored. This is required to make online red/green migration possible. Database schema change we will do later.
  • Empty or missing templates in the database or config-push do not trigger error messages or warnings
  • The new middleware version compiles the twig templates during cash warmup. Missing templates on disk or templates from disk that do not compile generate an error.
  • Event replay must continue to work.
  • Create / update tests

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions