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
Currently this is what happens in orchestrator mode:
backend receives webhook event
backend convert webhook event to jobs
backend Convert create jobSpecs from jobs
backend creates DiggerJob records from both jobs and jobspecs (database)
backend sends jobspec to cli
cli unmarshalls jobspec
cli converts jobspec to job
cli proceeds with execution
And what happens in backendless mode:
cli Receive action event
convert event payload to jobs
execute these jobs
As you can see in both cases we convert the webhook event to jobs. But in the case of orchestrator, the jobs needs to be converted to JobSpec for seraialization and then unserialized and converted to a job again. Why the unnecessary work? If instead we converted every event to a JobSpec we would be able to shorten the branches and make them all very common. This is the proposed refactor:
In orchestrator mode:
backend receives webhook event
backend converts webhook event to JobSpec
backend send jobspec to cli
cli unmashals jobspec
cli converts jobspec to job for execution
In backendless mode:
cli recieves action event
cli converts action event to JobSpec
cli converts jobspec to job for execution
Indeed it will lead to an additional step in the cli but it also makes the branches between both orchestrator and backendless mode much more common and therefore leads to less code duplication between both modes
The text was updated successfully, but these errors were encountered:
Also related to #1540
Currently this is what happens in orchestrator mode:
And what happens in backendless mode:
As you can see in both cases we convert the webhook event to jobs. But in the case of orchestrator, the jobs needs to be converted to JobSpec for seraialization and then unserialized and converted to a job again. Why the unnecessary work? If instead we converted every event to a JobSpec we would be able to shorten the branches and make them all very common. This is the proposed refactor:
In orchestrator mode:
In backendless mode:
Indeed it will lead to an additional step in the cli but it also makes the branches between both orchestrator and backendless mode much more common and therefore leads to less code duplication between both modes
The text was updated successfully, but these errors were encountered: