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

Fixed missing repo update when helm chart is not found #2698

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

enrichman
Copy link
Member

@enrichman enrichman commented Nov 15, 2023

Fix #2690

To fix an issue with the mittwald/go-helm-client#176 a breaking change was introduced: mittwald/go-helm-client#177

Basically it means that the AddOrUpdateChartRepo func is not updating the repositories anymore.

This PR fix the issue checking if the requested chart version is available in the repo, and if not found we update the repositories and check again. The initHelmOCIRegistryOrRepository was added to remove some code from the main func.

@enrichman enrichman added the kind/bug Something isn't working label Nov 15, 2023
@enrichman enrichman added this to the v1.11.0 milestone Nov 15, 2023
@enrichman enrichman self-assigned this Nov 15, 2023
@enrichman enrichman requested a review from a team as a code owner November 15, 2023 16:53
@enrichman enrichman linked an issue Nov 15, 2023 that may be closed by this pull request
@enrichman enrichman changed the title Fixed missing repo update repos if chart not found Fixed missing repo update if chart not found Nov 15, 2023
@enrichman enrichman changed the title Fixed missing repo update if chart not found Fixed missing repo update when chart not found Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (2d5f9ad) 67.03% compared to head (9a4552c) 66.14%.

Files Patch % Lines
internal/helm/helm.go 64.61% 17 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2698      +/-   ##
==========================================
- Coverage   67.03%   66.14%   -0.89%     
==========================================
  Files         212      212              
  Lines       18954    18986      +32     
==========================================
- Hits        12705    12559     -146     
- Misses       5128     5259     +131     
- Partials     1121     1168      +47     
Flag Coverage Δ
acceptance-api 43.74% <63.07%> (-3.50%) ⬇️
acceptance-apps 37.39% <58.46%> (+0.16%) ⬆️
acceptance-cli 62.86% <64.61%> (-0.31%) ⬇️
unittests 14.96% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@enrichman enrichman merged commit bc9f20c into main Nov 16, 2023
17 checks passed
@enrichman enrichman deleted the 2690-epinio-helm-update-interval branch November 16, 2023 08:54
@thehejik
Copy link
Contributor

Successfully verified on v1.11.0-rc1, working without epinio-server restart. No error and the service is running after version bump.

I could reproduce the issue on E v1.10.0. Restart of epinio-server to fetch latest chart from custom repo helped. BTW the OCI registries were not affected (there is no index.yaml to be refreshed).

Tested by using custom helm repo exposed on gh-pages.

This is used service manifest:

kubectl apply -f - <<EOF
apiVersion: application.epinio.io/v1
kind: Service
metadata:
  name: simplepod-dev
  namespace: epinio
spec:
  name: simplepod-dev
  shortDescription: Just a simple pod
  description: Just a simple pod
  chart: simplepod
  chartVersion: 0.0.3
  serviceIcon: https://bitnami.com/assets/stacks/nginx/img/nginx-stack-220x234.png
  appVersion: 0.0.1
  helmRepo:
    name: thehejik
    url: https://thehejik.github.io/testing-charts
EOF

This is how I was deploying the service:

$ epinio --verbosity=1 --trace-level=13 service create simplepod-dev asimplepod1 --wait

Once the original chartVersion was successfully deployed in E I bumped the version on github charts/simplepod/Chart.yaml to higher version and then triggered manually Release action on gh - then I verified that the index.yaml has been updated also in gh-pages branch.

After changing the service version by k edit services.application.epinio.io -n epinio simplepod-dev I tried to create another service:

$ epinio --verbosity=1 --trace-level=13 service create simplepod-dev asimplepod2 --wait

@andreas-kupries andreas-kupries changed the title Fixed missing repo update when chart not found Fixed missing repo update when helm chart is not found Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Epinio Helm Update Interval?
3 participants