-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Runner metadata events #17841
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
base: main
Are you sure you want to change the base?
Runner metadata events #17841
Conversation
606a882 to
cd127e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 10 files
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:30605 This environment will automatically shut down when the PR is closed or after 5 hours. |
Greptile OverviewGreptile SummaryThis PR refactors the workspace migration runner/action-handler flow to emit The new flow is wired through Key merge blockers are: (1) Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Builder as MigrationBuilder
participant Runner as WorkspaceMigrationRunnerService
participant Handler as RunnerActionHandlerService
participant Derive as deriveMetadataEventsFrom*Action
participant Apply as optimisticallyApply*Action
participant State as FlatEntityMaps
Builder->>Runner: execute(actions)
loop for each action
Runner->>Handler: handle(action, context)
Handler-->>Runner: { metadataEvents[], result }
Runner->>State: apply optimistic change
Runner->>Apply: optimisticallyApply*(action, State)
Apply-->>Runner: updated State
Runner->>Derive: deriveMetadataEventsFrom*(action, before/after)
Derive-->>Runner: metadataEvents
Runner-->>Runner: accumulate metadataEvents
end
Runner-->>Builder: { appliedActions, metadataEvents }
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 files reviewed, 5 comments
...e-migration-runner/interfaces/workspace-migration-runner-action-handler-service.interface.ts
Show resolved
Hide resolved
...ine/workspace-manager/workspace-migration/workspace-migration-runner/types/metadata-event.ts
Show resolved
Hide resolved
...migration/workspace-migration-runner/utils/derive-metadata-events-from-create-action.util.ts
Outdated
Show resolved
Hide resolved
...migration/workspace-migration-runner/utils/derive-metadata-events-from-delete-action.util.ts
Show resolved
Hide resolved
Additional Comments (1)
|
7be4daa to
97dd80b
Compare
charlesBochet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Introduction
Followup #17622
Refactoring the actions handler to be returning a metadata event
It has to be done incrementally, as if not update metadata event would be stale as depends on the incremental action execution order and optimistic application
What's next