This replaces the use of the method .patchStatus with a fluxcd/pkg/runtime/patch/SerialPatcher. The aim is to make repeated patching "obvious": you always assign into pipeline.Status, and you always call patcher.Patch(ctx, &pipeline) to do the right thing.
I've also changed the division of labour between Reconcile and status-updating helpers. Before, the helpers would do their own patching. I think it's more transparent if the helpers mutate the object status, and the Reconcile method chooses when to patch.
No new tests, since the behaviour is supposed to be the same.
This replaces the use of the method .patchStatus with a fluxcd/pkg/runtime/patch/SerialPatcher. The aim is to make repeated patching "obvious": you always assign into pipeline.Status, and you always call
patcher.Patch(ctx, &pipeline)
to do the right thing.I've also changed the division of labour between Reconcile and status-updating helpers. Before, the helpers would do their own patching. I think it's more transparent if the helpers mutate the object status, and the Reconcile method chooses when to patch.
No new tests, since the behaviour is supposed to be the same.