cds-snc / notification-planning

Project planning for GC Notify Team
4 stars 0 forks source link

Fix UI issue on dashboard around large templates #1232

Open jzbahrai opened 1 year ago

jzbahrai commented 1 year ago

Describe the bug

When we have a large template and we try to access the job that is using that template, we will see Lambda innvocation fail (lambda can only receive 6mb)

To Reproduce

Steps to reproduce the behavior:

  1. We can replicate this template from this service: https://notification.canada.ca/services/6938ae40-d45d-407a-a550-fb3252aebf35
  2. https://notification.canada.ca/services/6938ae40-d45d-407a-a550-fb3252aebf35/templates/db99b9b0-b4e4-4c91-a1cb-c27d4a64a605 - this is the template
  3. Send a job using the above template
  4. Look under Bulk sends on the dashboard
  5. Click on the job that uses this template - you will see a technical error

Expected behavior

We should not throw an error

Impact

Bad user experience.

whabanks commented 1 year ago

As @sastels identified during investigation, the max payload size for lambda functions is 6Mb. Using that template content, having a size of 231kb, a job can be sent without error as long as the number of recipients is <= 25. Once we pass 26 recipients, exceeding the 6Mb limit, then the error occurs.