Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC2024] update helm chart: Add common sub-chart #7581

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

abhi-bhatra
Copy link
Contributor

Motivation and context

There has been multiple issue coming due to conflict in common chart version of Redis and Postgresql.
Fixes #7449
Fixes #7507

How has this been tested?

  1. Apply Helm chart with analytics enabled (Result: helm chart working)
  2. Now, try to run helm chart again, with analytics disabled (Result: helm chart will get an error)
    Below is the error:
Error: 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
helm.go:84: [debug] 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

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@nmanovic nmanovic changed the title update helm chart: Add common sub-chart [GSoC2024] update helm chart: Add common sub-chart Mar 11, 2024
@nmanovic
Copy link
Contributor

@abhi-bhatra , could you please add a link into CHANGELOG.md? See instructions inside the file on how to do that.

@azhavoro
Copy link
Contributor

@abhi-bhatra thanks for the contribution
I have one question:
Are you sure that the current versions of Redis, Postgresql and Clickhouse charts will be compatible with all future versions of common chart v2.x.x?

@abhi-bhatra
Copy link
Contributor Author

abhi-bhatra commented Mar 12, 2024

Hi @azhavoro Thanks for looking at the contribution. I am sure about the version compatibility.
I have checked version of common chart in all these 3 charts, and used the static version which will not create an ambiguity of choosing a version by other charts.

dependencies:
- name: common
  repository: https://charts.bitnami.com/bitnami
  tags:
  - bitnami-common
  version: 2.x.x

But, still I will run few more test by changing versions of common chart and will see that if it is compatible with Redis, Postgresql and Clickhouse charts.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Merging #7581 (6574bd5) into develop (f513aa1) will decrease coverage by 0.12%.
Report is 39 commits behind head on develop.
The diff coverage is n/a.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7581      +/-   ##
===========================================
- Coverage    83.47%   83.35%   -0.12%     
===========================================
  Files          373      373              
  Lines        39739    39722      -17     
  Branches      3741     3747       +6     
===========================================
- Hits         33171    33112      -59     
- Misses        6568     6610      +42     
Components Coverage Δ
cvat-ui 79.20% <ø> (-0.09%) ⬇️
cvat-server 87.21% <100.00%> (-0.13%) ⬇️

@azhavoro
Copy link
Contributor

Wouldn't it be better to pin the common chart version (or at least a minor version) in case of possible backwards compatibility problems in the future?

Also, probably need to add a simple test to sure cvat can be deployed without analytics, which would certainly help to quickly detect possible problems in the future.

@nmanovic
Copy link
Contributor

@abhi-bhatra , will you be able to complete the PR?

@abhi-bhatra
Copy link
Contributor Author

HI @nmanovic I am working on it, and will complete it by today EOD

@abhi-bhatra
Copy link
Contributor Author

abhi-bhatra commented Mar 26, 2024

@azhavoro I have pinned the common chart version, but I would like you to point me where to add test for helm charts ?

Should I create a bash script ?

@azhavoro
Copy link
Contributor

@azhavoro I have pinned the common chart version, but I would like you to point me where to add test for helm charts ?

Should I create a bash script ?

I think it can be separate job in this workflow https://github.com/opencv/cvat/blob/develop/.github/workflows/helm.yml

@abhi-bhatra
Copy link
Contributor Author

Thanks @azhavoro I am adding test case in this workflow. Thanks for guiding me !

@abhi-bhatra
Copy link
Contributor Author

@azhavoro I have added a simple test case in the workflow, Can you review it ?

@azhavoro
Copy link
Contributor

azhavoro commented Apr 9, 2024

@abhi-bhatra Hello, the test example is not working, could you please fix it?

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

Successfully merging this pull request may close these issues.

Helm can't install with analytics.enabled false Helm Chart version mismatch between postgres and redis
4 participants