Informatievlaanderen / VSDS-Linked-Data-Interactions

https://informatievlaanderen.github.io/VSDS-Linked-Data-Interactions/
European Union Public License 1.2
4 stars 7 forks source link

[Clean Code]: Seperate Pipeline statusses from Ldio Input components #619

Open jobulcke opened 6 months ago

jobulcke commented 6 months ago

The issue

Currently, the pipeline statusses are mostly managed inside the LdioInput components, which is not a good practice for several reasons.

  1. Responsibilities are now mixed: the input component has now not only deal with their main purpose, which is handling the input, but also with dealing with the whole pipeline status
  2. The invocation of the start method is not consistent, in some of the sub classes, this happens inside the constructor and in other sub classes, this happens inside the autoconfigurator
  3. Bullet point 2 also introduces a minor (logging) bug. The pipeline status management tools are not completely caught up with the initalization of the pipeline and they already have to deal with pipeline status changes, which results in false error loggig:
    2024-04-30T08:45:16.185+02:00  WARN 36368 --- [nio-8888-exec-1] b.v.i.l.l.s.PipelineStatusService        : Non initialized pipeline received status update: my-new-status-pipeline

Proposed solution

Implementation of the status design pattern:

Other ideas are certainly welcome and maybe extra disscussion with the devs is required