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

replace engine.Unit with ComponentManager in Pusher Engine #6747

Open
wants to merge 16 commits into
base: feature/pusher-engine-refactor
Choose a base branch
from

Commits on Nov 21, 2024

  1. replace engine.Unit with ComponentManager in Pusher Engine

    Using #4219 as an example.
    Instead of starting new goroutines or directly processing messages
    in a blocking way, messages are added to a queue that a worker pulls from.
    The Pusher engine still currently implements network.Engine rather than
    network.MessageProcessor.
    tim-barry committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    3552f06 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d3f462 View commit details
    Browse the repository at this point in the history
  3. Pusher engine test: update negative test

    Because the event processing now happens in a worker, any errors
    raised within it are no longer visible to the caller of Process().
    Because the test checked for error status, moved the tests to the
    same package and call the internal processing function directly.
    tim-barry committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    0aadc13 View commit details
    Browse the repository at this point in the history
  4. Start pusher engine in mocks

    When using Unit, calling Ready would also start the engine.
    With ComponentManager, we additionally need to invoke Start.
    tim-barry committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    dec0d58 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2024

  1. Configuration menu
    Copy the full SHA
    b5418dd View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2024

  1. Configuration menu
    Copy the full SHA
    b7166f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e25cba7 View commit details
    Browse the repository at this point in the history
  3. Refactor pusher engine: rename and propagate error

    Rename `inboundMessageWorker` and `processInboundMessages` to `outbound`
    and also propagate errors to the top level of the worker
    where they can be thrown.
    tim-barry committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    f2f53a8 View commit details
    Browse the repository at this point in the history
  4. Refactor pusher engine

    - Partially implement suggestion #6747 (comment)
      - Make `SubmitCollectionGuarantee` non-exported and rename to `publishCollectionGuarantee`
      - Add new `SubmitCollectionGuarantee` exported function that just adds to the queue
    - Remove `messageHandler` field, instead directly add to queue
      from review: #6747 (comment)
    - `OriginID`s no longer included in messages in the queue, and therefore not
       checked by the worker - if necessary they should be checked when Submitting
    tim-barry committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    f66ba69 View commit details
    Browse the repository at this point in the history
  5. Revert "Pusher engine test: update negative test"

    This reverts commit 0aadc13.
    Instead of testing the internals, test the exported interface.
    tim-barry committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    1c80949 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fbed8e7 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'feature/pusher-engine-refactor' into tim/7018-pusher-en…

    …gine-use-componentmanager
    tim-barry authored Nov 27, 2024
    Configuration menu
    Copy the full SHA
    051e6d4 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2024

  1. Refactor pusher engine: queue length metrics

    Rename queue and add length metrics for it, updating creation sites.
    tim-barry committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    ddb0cb7 View commit details
    Browse the repository at this point in the history
  2. Update pusher engine doc comment

    Co-authored-by: Alexander Hentschel <[email protected]>
    tim-barry and AlexHentschel authored Nov 29, 2024
    Configuration menu
    Copy the full SHA
    17a9a2b View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2024

  1. Apply suggestions from code review

    Doc comment changes, metrics naming, and queue length.
    For reasoning behind chosen queue length, see #6747 (comment)
    
    Co-authored-by: Jordan Schalm <[email protected]>
    tim-barry and jordanschalm authored Nov 30, 2024
    Configuration menu
    Copy the full SHA
    aad332c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad04f27 View commit details
    Browse the repository at this point in the history