tmforum-oda / oda-canvas

Apache License 2.0
19 stars 50 forks source link

GitHub action: Run chart-releaser failing due to chart.lock file error #235

Open LesterThomas opened 4 months ago

LesterThomas commented 4 months ago

Description

The Run chart-releaser GitHub action is failing due to chart.lock file error image

This is happening even though the Chart.lock appears to have the same dependencies as the Chart.yaml

ferenc-hechler commented 4 months ago

Maybe there is missing a helm dependency build in the new "dependentapi-simple-operator" chart.

LesterThomas commented 4 months ago

I've tested the GitHub actions in my own fork https://github.com/LesterThomas/oda-canvas

I managed to get the GHActions working by removing the .lock file from https://github.com/tmforum-oda/oda-canvas/tree/master/charts/api-gateway (I've no idea why it was failing as the .lock file looked to have the same dependencies as the .yaml file).

I'll contribute this fix as a PR - I'm planning to include manually recreating the images in https://hub.docker.com/orgs/tmforumodacanvas/ at the same time

ferenc-hechler commented 4 months ago

Maybe I misunderstood how to maintain those files. I commited my local charts.lock file after I deployed from my local filesystem. Should I avoid checking in the lock file?

LesterThomas commented 2 months ago

It is generally considered good practice to commit the Chart.lock files to the repository. Committing the Chart.lock files ensures that the exact versions of the dependencies are pinned, which helps in maintaining consistency across different environments and builds. See should-helm-dependencies-charts-folder-be-version-controlled.

This practice prevents issues that may arise from dependency updates or changes that could occur if the dependencies were not pinned.

Committing Chart.lock files helps to:

LesterThomas commented 2 months ago

I think the issue we are experiencing is due to the Chart Releaser action not working well when some of the charts have not been updated. This requires further investigation.