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

Automatically create HELM_GIT_*_CACHE folders #303

Open
lucasfcnunes opened this issue Sep 4, 2024 · 1 comment
Open

Automatically create HELM_GIT_*_CACHE folders #303

lucasfcnunes opened this issue Sep 4, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@lucasfcnunes
Copy link

lucasfcnunes commented Sep 4, 2024

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.

@lucasfcnunes lucasfcnunes added the bug Something isn't working label Sep 4, 2024
@lucasfcnunes lucasfcnunes changed the title Bug: Setting HELM_GIT_*_CACHE doesn't pre-create needed folders Bug: Setting HELM_GIT_*_CACHE doesn't pre-create set folders Sep 4, 2024
@aslafy-z
Copy link
Owner

aslafy-z commented Sep 4, 2024

I don't think it's a bug but a missing feature. I confirm helm-git does not create cache directories if they don't exists as of today. I would be happy to merge such a feature. PRs are welcome :)

@aslafy-z aslafy-z added enhancement New feature or request and removed bug Something isn't working labels Sep 4, 2024
@aslafy-z aslafy-z changed the title Bug: Setting HELM_GIT_*_CACHE doesn't pre-create set folders Automatically create HELM_GIT_*_CACHE folders Sep 4, 2024
@aslafy-z aslafy-z added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants