-
Notifications
You must be signed in to change notification settings - Fork 27
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
✨ Notify payment via email ⚠️ #5310
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5310 +/- ##
=======================================
Coverage 87.2% 87.3%
=======================================
Files 1317 1320 +3
Lines 53935 54073 +138
Branches 1174 1174
=======================================
+ Hits 47085 47209 +124
- Misses 6599 6613 +14
Partials 251 251
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f0d1400
to
e62e4ed
Compare
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.
Very very nice! thanks! Just please think about the 2 different DB concept and whether we can still do it easily in the future.
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.
I see that this goes into the direction of the notification service.
I would guess at some point well extract all these into a separate service that all other platform services can use.
services/payments/src/simcore_service_payments/services/notifier_email.py
Show resolved
Hide resolved
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.
Looks good to me. Thanks a lot for the effort.
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.
looks good, ack!
Quality Gate passedIssues Measures |
What do these changes do?
This PR implements a mechanism to notify by email the user when a payment has been acknowledged as successful. In this version, the templates are hard-coded in the code but this will be moved to some external storage (s3 or db) in subsequent PRs.
NOTE that the email notification is implemented is optional i.e.
PAYMENTS_EMAIL=null
disables this feature.Highlights
services/notifier_acb.py
)services/notifier_ws.py
)services/notifier_email.py
)aiosmtplib
)Jinja2
)Related issue/s
How to test
services/payments/tests/unit/test_services_notifier_email.py
manual tests ⚗️
Using
--external-*
arguments allows to run some tests against external targets. Some practicalpytest [email protected] --external-envfile=.myenv -k test_send_email_workflow --pdb tests/unit
make test-repo-config SEARCH_ROOT=/path/to/ospar-config/deployments
DevOps⚠️
PAYMENTS_EMAIL
andSMTP_*
envs in the payment serviceDevOps Checklist