-
Notifications
You must be signed in to change notification settings - Fork 305
smtp_batch: add feature for grouping and templating #2610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Feel free to have a look, but it will be some time (estimate: 1-2 weeks) until I can have a look at the failing pipelines.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, thanks! :)
|
||
def build_mail(self, mail, send=False, override_to=None): | ||
def build_mail(self, mail, send=False, override_to=None, template_data:dict[str, Any]={}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integrate template_data
into the Mail
dataclass instead of passing tuples.
Add annotations in the new code for the non-trivial objects (they did not exist when I wrote it originally), ex, def build_mail(self, mail: Mail,
Like discussed in #2586, here is the thing. I already did some manual testing regarding templating the subject string. For this configured
extra.my_template_value
to the events (I did this with the modify bot for now)extra.my_template_value
) to the newadditional_grouping_keys
parametersubject: "Prefix {{ extra_my_template_value }}"
templating: {subject: true}
But probably some tests in the test suite will be needed for this (but I'd like to defer this one after the first feedback round)
Any comments?
Maybe issues to discuss:
hash_arbitrary
template_data
along with eachmail
as a tuplerequirements.txt
?Also I didn't get the testing environment setup correctly until now, so it would be nice if someone could trigger the pipelines yet already so I can check the outputs regarding code-style.