Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/several] CI/CD failing if dependencies updated using Helm 3 #20809

Closed
carrodher opened this issue Feb 17, 2020 · 4 comments
Closed

[stable/several] CI/CD failing if dependencies updated using Helm 3 #20809

carrodher opened this issue Feb 17, 2020 · 4 comments
Assignees

Comments

@carrodher
Copy link
Collaborator

carrodher commented Feb 17, 2020

Describe the bug
There are some PRs failing in the CI/CD tests with the following error:

Error: requirements.lock is out of sync with requirements.yaml

for example this one: #20798

This PR is updating the images, the chart version, app version, etc. We did this kind of PRs automatically for a long time without any issue. In the past week, we update our internal pipeline to use Helm 3 instead of Helm 2 (as recommended).

Since this version bump, we are receiving the above error by the CI/CD in those charts with dependencies.

The issue is that the generated digest or generated in the requirements.lock is not the same if you run helm dep update with Helm 3 and Helm 2:

Helm 2

$ helm2 dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete.
Saving 1 charts
Downloading mariadb from repo https://kubernetes-charts.storage.googleapis.com/
Deleting outdated charts

$ cat requirements.lock | grep -A 2 digest
digest: sha256:cd64413a4a697ccf85c0091e9c55cdc5876938ddced84c05d37c57ff9abc5864
generated: "2020-02-18T11:09:35.806304593Z"

Helm 3

$ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading mariadb from repo https://kubernetes-charts.storage.googleapis.com/
Deleting outdated charts

$ cat requirements.lock | grep -A 2 digest
digest: sha256:54dca7bae6be7a5ba35fa733f407bb2960ea718c1e3f6afa622c4f934d22d22c
generated: "2020-02-18T11:07:45.185624819Z"

As you can see, the digest (and generated) are different without other changes apart from the Helm version.
In the mentioned PR, changes in the requirements.lock are just the autogenerated ones due to run helm dep update using Helm 3: https://github.com/helm/charts/pull/20798/files#diff-d52af004c1d687e2a87224fb352d5e99

It seems this issue is already reported and fixed in Helm 3 but there is no backward compatibility, so AFAIK Helm 2 is not able to recognize requirements.lock built using Helm 3:
helm/helm#4011
helm/helm#2731

In this case, as the CI/CD system is using Helm 2 all the PRs with dependencies updated with Helm 3 are going to fail:

readonly HELM_TARBALL=helm-v2.9.1-linux-amd64.tar.gz

Which chart:
All of the charts with dependencies

@carrodher
Copy link
Collaborator Author

/assign @mattfarina @unguiculus @cpanato

@unguiculus
Copy link
Member

For the record: CI uses https://github.com/helm/charts/blob/master/test/e2e.sh.

Indeed, CI still uses Helm 2. This will not change. See https://github.com/helm/charts#deprecation-timeline

@juan131
Copy link
Collaborator

juan131 commented Feb 19, 2020

Hi @unguiculus

This will not change

Could you please elaborate the reasons for this? Do you refer to this?

Given the deprecation plan, this project is intended for apiVersion: v1 Charts (installable by both Helm 2 and 3), and not for apiVersion: v2 charts (installable by Helm 3 only)

@carrodher
Copy link
Collaborator Author

Closing this issue as we moved all the Bitnami maintained charts to the bitnami repo (#20969) and this issue is not going to happen again as there wouldn't be new releases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants