You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
Extensions like LambdaUI want to send updates about the build state (in this case via Websocket) to their clients whenever something changes.
At the moment, they can listen e.g. for :step-result-updated but (because event-bus listeners don't have an order) can't be sure that this event has already been processed by the pipeline-state component, i.e. that they'll actually find the new state when asking the pipeline-state component.
Example: I want to assemble a build history after I received an event that indicates that a pipeline-run is completed. When I receive this event, I need to ask the pipeline-state component for the current state to assemble history information. But I can't be sure that I actually get the new history because it might not have processed the same event I received yet.
Potential Solutions
Extensions needing this information track their own state based on existing events
Pro: * No additional APIs needed from lambdacd-core * Their state can be custom-tailored for their use-case
Con: * Additional effort for extension-developers * Hard to get right, especially when data has to be loaded from persistence and not from events that occurred during the runtime of the current process
Introduce events that are triggered once the persistence component processed the event
Pro:
Minimal effort for extension-developers
Con:
Additional API
Potentially confusing to developers (:step-result-updated or :step-result-update-persisted???)
Problem
Extensions like LambdaUI want to send updates about the build state (in this case via Websocket) to their clients whenever something changes.
At the moment, they can listen e.g. for
:step-result-updated
but (because event-bus listeners don't have an order) can't be sure that this event has already been processed by the pipeline-state component, i.e. that they'll actually find the new state when asking the pipeline-state component.Example: I want to assemble a build history after I received an event that indicates that a pipeline-run is completed. When I receive this event, I need to ask the pipeline-state component for the current state to assemble history information. But I can't be sure that I actually get the new history because it might not have processed the same event I received yet.
Potential Solutions
Extensions needing this information track their own state based on existing eventsPro:* No additional APIs needed from lambdacd-core* Their state can be custom-tailored for their use-caseCon:* Additional effort for extension-developers* Hard to get right, especially when data has to be loaded from persistence and not from events that occurred during the runtime of the current processIntroduce events that are triggered once the persistence component processed the event
Pro:
Con:
:step-result-updated
or:step-result-update-persisted
???)Context
Related issues
The text was updated successfully, but these errors were encountered: