Skip to content

Automatically create HELM_GIT_*_CACHE folders #303

@lucasfcnunes

Description

@lucasfcnunes

Helm version: version.BuildInfo{Version:"v3.15.4", GitCommit:"fa9efb07d9d8debbb4306d72af76a383895aa8c4", GitTreeState:"clean", GoVersion:"go1.22.6"}
helm-git version: 0.15.1
Git version: 2.46.0

Steps To Reproduce

  1. HELM_GIT_DEBUG=1 HELM_GIT_REPO_CACHE='~/.cache/helm/git-helm/repo' HELM_GIT_CHART_CACHE='~/.cache/helm/git-helm/chart' helm repo add wazuh-helm 'git+https://github.com/lucasfcnunes/wazuh-helm@?ref=v0.0.1' --force-update

Link to chart repository: https://github.com/lucasfcnunes/wazuh-helm/tree/v0.0.1

The current behavior

Debug[196768] in plugin 'helm-git': repo: https://github.com/lucasfcnunes/wazuh-helm ref: v0.0.1 path:  file: index.yaml sparse: 1 depupdate: 1 package: 1
Debug[196768] in plugin 'helm-git': helm_repo_uri: git+https://github.com/lucasfcnunes/wazuh-helm@?ref=v0.0.1&sparse=1&depupdate=1&package=1
Debug[196768] in plugin 'helm-git': Helm request not found in cache ~/.cache/helm/git-helm/chart/759d8bd436d994883a6f8e8441308d3e/index.yaml
Debug[196768] in plugin 'helm-git': Trying to intercept for https://github.com/lucasfcnunes/wazuh-helm#v0.0.1
Debug[196768] in plugin 'helm-git': HELM_GIT_REPO_CACHE:~/.cache/helm/git-helm/repo is not a directory, cannot cache
/home/vscode/.local/share/helm/plugins/helm-git/helm-git: 154: cd: can't cd to ~/.cache/helm/git-helm/chart/759d8bd436d994883a6f8e8441308d3e
Error: open /tmp/helm-git.G3xsBB/~/.cache/helm/git-helm/chart/759d8bd436d994883a6f8e8441308d3e/index.yaml3973845737: no such file or directory
Error in plugin 'helm-git': Error while helm_index
Error: looks like "git+https://github.com/lucasfcnunes/wazuh-helm@?ref=v0.0.1" is not a valid chart repository or cannot be reached: plugin "helm-git" exited with error

The expected behavior

Should create the set folders in the env vars and cache the repo and chart in the respective path.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions