Skip to content

Postmortem ‐ prod outage April May 2024

elasticspoon edited this page May 5, 2024 · 4 revisions

Had an issue on prod for a week where users could not create case contacts.

Causes

The issue was when an org has neither driving reimbursement nor additional expenses no parameters would be submitted on /case_contacts/:id/form/expense.

This meant that params would not contain case_contact and params[:case_contact][:status] = step.to_s unless @case_contact.active? would fail or later with params.require(:case_contact).permit(...)

Temp Fix

The temporary fix was to add <%= form.hidden_field :placeholder, value: true %> to ensure something is always submitted. https://github.com/rubyforgood/casa/blob/f8d7cf8e8cb96d39957ba1046313672f48ceb1dd/app/views/case_contacts/form/expenses.html.erb#L5

This is a terrible hacky fix.

Future Refactoring

Open an issue to refactor the fix: https://github.com/rubyforgood/casa/issues/5666

Related PRS:

  1. https://github.com/rubyforgood/casa/pull/5658
  2. https://github.com/rubyforgood/casa/pull/5656
  3. https://github.com/rubyforgood/casa/pull/5655
  4. https://github.com/rubyforgood/casa/pull/5654
  5. https://github.com/rubyforgood/casa/pull/5643
  6. https://github.com/rubyforgood/casa/pull/5642
  7. https://github.com/rubyforgood/casa/pull/5641
  8. https://github.com/rubyforgood/casa/pull/5659