cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.64k stars 3.01k forks source link

Helm Chart version mismatch between postgres and redis #7449

Open RolandWolman opened 9 months ago

RolandWolman commented 9 months ago

Actions before raising this issue

Steps to Reproduce

  1. With values.yaml containing
postgresql:
  enabled: true
redis:
  enabled: true

and the default versions from Chart.yaml

dependencies:
  - name: postgresql
    version: "12.1.*"
    repository: https://charts.bitnami.com/bitnami
    condition: postgresql.enabled
  - name: redis
    version: "18.5.*"
    repository: https://charts.bitnami.com/bitnami
    condition: redis.enabled

helm upgrade --install

results in

Error: UPGRADE FAILED: template: cvat/charts/redis/templates/master/service.yaml:12:14: executing "cvat/charts/redis/templates/master/service.yaml" at <include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $)>: error calling include: template: cvat/charts/postgresql/charts/common/templates/_labels.tpl:6:27: executing "common.labels.standard" at <include "common.names.name" .>: error calling include: template: cvat/charts/postgresql/charts/common/templates/_names.tpl:6:18: executing "common.names.name" at <.Chart.Name>: nil pointer evaluating interface {}.Name

Chart.lock

dependencies:
- name: postgresql
  repository: https://charts.bitnami.com/bitnami
  version: 12.1.15
- name: nuclio
  repository: https://nuclio.github.io/nuclio/charts
  version: 0.12.1
- name: vector
  repository: https://helm.vector.dev
  version: 0.19.2
- name: clickhouse
  repository: https://charts.bitnami.com/bitnami
  version: 4.1.16
- name: grafana
  repository: https://grafana.github.io/helm-charts
  version: 6.60.6
- name: traefik
  repository: https://helm.traefik.io/traefik
  version: 25.0.0
- name: redis
  repository: https://charts.bitnami.com/bitnami
  version: 18.5.0
digest: sha256:f2002bbe6d04d607b81b373991c1a05ec533e3da5edbc92b5d082d23d50656ca
generated: "2024-02-07T16:46:49.280424046+01:00"

Expected Behavior

Helm installation should run successfully

Possible Solution

upgrade postgres version in Chart.yaml

dependencies:
  - name: postgresql
    version: "12.9.0"
    repository: https://charts.bitnami.com/bitnami
    condition: postgresql.enabled

as suggest in this issue resolves the issue.

Chart.lock now looks like this

dependencies:
- name: postgresql
  repository: https://charts.bitnami.com/bitnami
  version: 12.9.0
- name: nuclio
  repository: https://nuclio.github.io/nuclio/charts
  version: 0.12.1
- name: vector
  repository: https://helm.vector.dev
  version: 0.19.2
- name: clickhouse
  repository: https://charts.bitnami.com/bitnami
  version: 4.1.16
- name: grafana
  repository: https://grafana.github.io/helm-charts
  version: 6.60.6
- name: traefik
  repository: https://helm.traefik.io/traefik
  version: 25.0.0
- name: redis
  repository: https://charts.bitnami.com/bitnami
  version: 18.5.0
digest: sha256:21c9226320b0d6112468d18c0d4be7117c17e82f83801fab2fcb691f430c657c
generated: "2024-02-07T16:17:50.197680436+01:00"

for the redis Chart.lock we get

dependencies:
- name: common
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 2.13.3
digest: sha256:9a971689db0c66ea95ac2e911c05014c2b96c6077c991131ff84f2982f88fb83
generated: "2023-10-19T12:32:36.790999138Z"

and postgres Chart.lock

dependencies:
- name: common
  repository: oci://registry-1.docker.io/bitnamicharts
  version: 2.9.0
digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9
generated: "2023-08-22T14:27:37.862238+02:00"

These versions of common seem to be more compatible.

Context

No response

Environment

No response

Enzawdo commented 9 months ago

"Charts bitnami/postgresql:12.5.6 and bitnami/redis:17.17.1 are using incompatible versions of bitnami/common. The issue can be fixed by updating the bitnami/postgresql chart to a version later than 12.9.0.

Edit: Version 2.9.0 of bitnami/common was indeed backward-compatible (https://github.com/bitnami/charts/pull/18154). The issue appears to be with Helm handling conflicting dependencies.

In this case, redis:18.2.0 uses bitnami/common:2.13.3, while postgresql:12.5.6 uses bitnami/common:2.8.0. IMO, expected behavior should be that Helm should prioritise bitnami/common:2.13.3 over 2.8.0, because it is the latest under the same major." taken from https://github.com/bitnami/charts/issues/20504

abhi-bhatra commented 8 months ago

Hi @nmanovic This issue is due to unmatched versions of common sub charts in Postgres, Redis. I have separately installed common chart as sub dependency, and tested. I have faced no issues then. Please assign this issue to me.