-
Notifications
You must be signed in to change notification settings - Fork 5
Feat/monthly reports #508
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
Feat/monthly reports #508
Conversation
b228930
to
f813251
Compare
While running this lambda in our test env, we encountered quantity data returned from the authorize.net account in the format '1.0' we never expect to have partial quantities of items, so we need to cast these to floats before casting them to integers.
This was accidentally dropped during a rebase
For some reason, week_day 5 is showing up as Thursday on the event bridge schedule, but we want this to run on Friday. This uses the day abbreviation to explicitly set the schedule to Friday.
957afa9
to
cb1a03c
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.
Looks really good! A few questions:
backend/compact-connect/lambdas/nodejs/tests/email-notification-service-lambda.test.ts
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/stacks/persistent_stack/transaction_reports_bucket.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
- comments describing purpose of .gz files - remove unneeded cors policies from transaction report bucket
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.
Nearly there...
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
...-connect/lambdas/python/purchases/tests/function/test_handlers/test_transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
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.
Great! @jlkravitz , this is ready for you.
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.
Generally looks good. A couple questions/comments!
backend/compact-connect/lambdas/nodejs/tests/email-notification-service-lambda.test.ts
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_history.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/purchases/handlers/transaction_reporting.py
Show resolved
Hide resolved
Given that we don't have hard requirements for how admins will access these reports outside of email messages, this removes the unnecessary complexity of storing .gz files.
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 great! Thanks for clarifying the tests. @isabeleliassen Good to merge.
@jlkravitz still some unresolved conversations I think! |
@isabeleliassen those have now been resolved. This should be ready to go. Thanks. |
CSG has requested that we implement automated monthly transaction reporting. This required several updates to increase the number of transactions that could be handled within a single report. Previously we were passing in the full csv report string to the email-service lambda payload, which was prone to a 6MB file size limit, now we are storing these reports in a compressed zip format in S3, and passing in the S3 key to the email service so it can pull down the file and attach the zip file to the email directly. This adds the needed infrastructure to support monthly reporting in a scaleable manner.
Requirements List
Description List
Testing List
yarn test:unit:all
should run without errors or warningsyarn serve
should run without errors or warningsyarn build
should run without errors or warningsCloses #493