Refactor Pipeline Lifecycle to be Centered Around PipelineFactory
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 63
Description
The current Pipeline class is very complicated and difficult to reason about. Many different concerns are mixed, and its constructor signature contains a number of oddities and redundancies. We propose in this issue to refactor the codebase to add a new `PipelineBuilder` class to abstract the construction of the pipeline and provide an opportunity to cleanly separate concerns. The builder work look something like:
```ruby
PipelineFactory.new
.ir(pipeline_ir)
.settings(settings)
.agent(agent)
.metrics(metrics)
.queue(queue)
.dlq(dlq)
.build
```
Instead of building up various objects to pass into `Pipeline#new` we would build a partial `PipelineFactory` and incrementally enrich it before calling `build` to instantiate the pipeline.
This is a product of a meeting between @jsvd @ph and myself
Contributor guide
Assessment
This issue has not been assessed yet.