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

feat: pending registry commands #32

Merged
merged 1 commit into from
Sep 4, 2024
Merged

feat: pending registry commands #32

merged 1 commit into from
Sep 4, 2024

Conversation

0xyaco
Copy link
Collaborator

@0xyaco 0xyaco commented Sep 3, 2024

πŸ€– Linear

Closes GRT-151

Description

  • Add pending EboRegistry commands
    • ResponseDisputed β†’ AddDispute command
    • DisputeStatusChanged β†’ UpdateDisputeStatus command
    • RequestFinalized β†’ Noop command
  • Uses these new commands while processing events

Copy link

linear bot commented Sep 3, 2024

GRT-151 Add missing EboRegistry commands

When refactoring the EboActor, the concept of EboRegistry rollback-able commands where introduced.

Two commands were already implemented, we need to complete those commands to cover actor's handling for the following three events:

  • ResponseDisputed
  • DisputeStatusChanged
  • RequestFinalized

AC:

  • All relevant events have an associated command to update the registry in a rollback-able way

@0xyaco 0xyaco requested review from 0xkenj1 and 0xnigir1 September 3, 2024 20:02
Base automatically changed from feat/actor-as-event-queues to feat/processor-start September 3, 2024 20:05
@0xyaco 0xyaco marked this pull request as draft September 3, 2024 20:25
@0xyaco 0xyaco force-pushed the feat/registry-commands branch from f661d4e to a32ec9b Compare September 3, 2024 20:30
@0xyaco 0xyaco requested review from 0xkenj1 and 0xnigir1 September 3, 2024 20:30
@0xyaco 0xyaco marked this pull request as ready for review September 3, 2024 20:30
Base automatically changed from feat/processor-start to dev September 3, 2024 20:38
@0xyaco 0xyaco force-pushed the feat/registry-commands branch from a32ec9b to 93d1461 Compare September 3, 2024 20:52
Copy link
Collaborator

@0xnigir1 0xnigir1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like this command approach πŸ™‚

@@ -378,9 +399,6 @@ export class EboActor {
* @param event `RequestCreated` event
*/
public async onRequestCreated(event: EboEvent<"RequestCreated">): Promise<void> {
if (event.metadata.requestId != this.actorRequest.id)
throw new RequestMismatch(this.actorRequest.id, event.metadata.requestId);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why are we skiping this validation.

@0xyaco 0xyaco merged commit fe045ff into dev Sep 4, 2024
5 checks passed
@0xyaco 0xyaco deleted the feat/registry-commands branch September 4, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants