human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Event Sourcing - Next Steps

Open dorner opened this issue 2 years ago • 2 comments

Summary

  • Add a method to validate current inventory against event sourced inventory.
  • Whenever an event is being created, validate it.
  • If a validation fails, add a yellow notice to the UI indicating the discrepancy.
  • Create an inventory_discrepancies table.
  • If there is a discrepancy between the event sourcing calculation of current inventory and the DB, add a log to to the table including the diff as well as the user e-mail, controller action and parameters which caused it.
  • We should audit this table at least once a week and figure out what to do with the discrepancies.
  • We should add a button to the superadmin UI to resync a single organization or all organizations.
  • We should update the logic to build inventory by only starting from the most recent SnapshotEvent.

Things to consider

No response

Criteria for Completion

No response

dorner avatar Oct 15 '23 14:10 dorner

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Nov 15 '23 00:11 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Nov 22 '23 00:11 github-actions[bot]

We're tracking this outside of the issues now, so I'm closing this.

dorner avatar May 24 '24 19:05 dorner