conduit
conduit copied to clipboard
Failing to build a pipeline from a config. file results shows "processor already running" in logs
Bug description
failed to start pipeline: could not build nodes for pipeline test-pipeline: could not build source nodes: could not build processor nodes for connector test-pipeline:test-connector: processor already running
Steps to reproduce
- Specify an older version of a built-in connector in a pipeline config file, e.g.
builtin:[email protected] - Run pipeline
Version
v0.11.1
Before the error above, the following error can be seen:
"pipeline \"test-pipeline-builtin-processor\", error while provisioning: could not start the pipeline \"test-pipeline-builtin-processor\": could not build nodes for pipeline test-pipeline-builtin-processor: could not build destination nodes: failed to get plugin dispenser: could not find builtin plugin \"builtin:[email protected]\", only found versions [v0.7.0 latest]: plugin not found"
After debugging the issue, I found it actually comes to "processor already running":
- Conduit loads a functioning pipeline from a configuration file. The pipeline is also saved to the database.
- Conduit is stopped.
- Invalid changes are made to the pipeline configuration file (e.g. an invalid destination plugin version).
- Conduit is started again.
- The provisioning service tries running the pipeline that's in the configuration file.
- Firstly, the source nodes are built, then the processor nodes, and then the destination nodes.
- Building the destination nodes fails (because the plugin doesn't exist).
- The processor nodes have already been built (this will become important later).
- The pipeline cannot be run, and the provisioning service is done with its work.
- After that, the pipeline service runs, and tries running the pipelines in the database.
- The pipeline service tries to run the same pipeline from above.
- The processor nodes have already been built, so it fails because the processor is already running.
Here I believe we have two issues:
- Nodes are not properly cleaned up when a pipeline cannot be built.
- The pipeline service tries to re-run the pipelines that the provisioning already tried running.
If I am not mistaken, its seems as thought the latest build solves "processor already running". I will have a look at point 2.
@AdamHaffar any update here?
Closing the issue as pipeline recovery epic fixed the issue where the error "processor already running" is thrown.