premature update of HelmReleases (pipeline failing with error: "NoSourceArtifact")
Context, history of this issue: pipeline failing with error: "NoSourceArtifact" but in actual artifact created successfully
Pipeline: https://gitlab.com/sylva-projects/sylva-core/-/jobs/8968872109#L364
Error: HelmChart/sylva-system-sylva-units state changed: NoSourceArtifact - no artifact available for GitRepository source 'sylva-units'
But artifact seems created successfully: https://gitlab.com/sylva-projects/sylva-core/-/jobs/8968872109#L319
2025/01/28 10:13:35.314077 GitRepository/sylva-units state changed: Succeeded - stored artifact for revision 'sha1:69a452c2e34f09635873b72a95a6118212599931'
Explanation
(see discuss here below)
There is an unintended premature update of the cluster HelmRelease, due to the update of its source (sylva-capi-cluster GitRepository). This triggers a node rolling update that result in node drains and pod deletions (here in this case of the Flux source-controller, leading to making the HelmChart unavailable).