Skip to content
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

In-memory order updater #5872

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Nov 8, 2024

  1. Add db-query-matchers gem

    https://github.com/sds/db-query-matchers
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Harmony Evangelina <[email protected]>
    Co-authored-by: Jared Norman <[email protected]>
    Co-authored-by: Nick Van Doorn <[email protected]>
    Co-authored-by: Noah Silvera <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Tom Van Manen <[email protected]>
    10 people authored and forkata committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    1f45b88 View commit details
    Browse the repository at this point in the history
  2. Copy existing OrderUpdater implementation

    In subsequent commits we'll ensure that this can update orders in
    memory, without persisting changes using manipulative DB queries.
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Harmony Evangelina <[email protected]>
    Co-authored-by: Jared Norman <[email protected]>
    Co-authored-by: Nick Van Doorn <[email protected]>
    Co-authored-by: Noah Silvera <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Tom Van Manen <[email protected]>
    10 people authored and forkata committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    a3003e1 View commit details
    Browse the repository at this point in the history
  3. Add persist flag to #recalculate

    We want our new in-memory order updater to be able to persist or not
    persist changes to the order record.
    
    WORK IN PROGRESS
    
    This is a first step in ensuring we don't need to write to the database
    using the order updater. Clearly we have more work to do to ensure this
    functions like the existing updater.
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Harmony Evangelina <[email protected]>
    Co-authored-by: Jared Norman <[email protected]>
    Co-authored-by: Nick Van Doorn <[email protected]>
    Co-authored-by: Noah Silvera <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Tom Van Manen <[email protected]>
    10 people authored and forkata committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    d3ebe4e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eaf2c02 View commit details
    Browse the repository at this point in the history
  5. Conditionally persist Shipment#update_amounts changes

    This is in service of supporting the InMemoryOrderUpdater's goal to not do database writes.
    Noah-Silvera authored and forkata committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    870c37a View commit details
    Browse the repository at this point in the history
  6. Preventing InMemoryOrderUpdater#update_shipment_amounts from making d…

    …atabase writes
    
    We have prevented write calls to update the cost and `updated_at` of a
    shipment, as well as allowed us to conditionally persist item totals, by
    passing down the `persist` argument to that method.
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Harmony Evangelina <[email protected]>
    Co-authored-by: Kendra Riga <[email protected]>
    Co-authored-by: Jared Norman <[email protected]>
    Co-authored-by: Tom Van Manen <[email protected]>
    Co-authored-by: Chris Todorov <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Benjamin Willems <[email protected]>
    11 people committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    203ed70 View commit details
    Browse the repository at this point in the history
  7. Rename method that recalculates shipment state

    Update implies that we are persisting the change in Rails, which this
    method does not do.
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Kendra Riga <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Benjamin Willems <[email protected]>
    7 people committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    8040224 View commit details
    Browse the repository at this point in the history
  8. Rename method that recalculates payment state

    Update implies that we are persisting the change in Rails, which this
    method does not do.
    
    Co-authored-by: Adam Mueller <[email protected]>
    Co-authored-by: Andrew Stewart <[email protected]>
    Co-authored-by: Benjamin Willems <[email protected]>
    Co-authored-by: Senem Soy <[email protected]>
    Co-authored-by: Sofia Besenski <[email protected]>
    Co-authored-by: Kendra Riga <[email protected]>
    7 people committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    7ce5874 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6d6cc69 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d244646 View commit details
    Browse the repository at this point in the history