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

Bug: failure when using the same Helm version twice #84

Closed
1 task done
jferris opened this issue May 24, 2023 · 1 comment · Fixed by #85
Closed
1 task done

Bug: failure when using the same Helm version twice #84

jferris opened this issue May 24, 2023 · 1 comment · Fixed by #85
Labels
bug Something isn't working idle Inactive for 14 days

Comments

@jferris
Copy link
Contributor

jferris commented May 24, 2023

What happened?

When running k8s-bake in two steps in the same workflow with the same Helm version, the second step will attempt to run Helm using the cached directory rather than the cached executable.

Expected: the second step will run Helm using the executable from the cached directory.

Actual:

Error: Failed to run bake action. Error: Error: Unable to locate executable file: /opt/hostedtoolcache/helm/3.8.2/x64. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

Example:

- name: Bake one
  uses: azure/k8s-bake@v2.4
  with:
    renderEngine: 'helm'
    helmChart: ./deploy/charts/one
    helmVersion: 'v3.8.2'
    releaseName: one
    namespace: ${{ inputs.namespace }}
  id: bake-one

- name: Bake etwo
  uses: azure/k8s-bake@v2.4
  with:
    renderEngine: 'helm'
    helmChart: ./deploy/charts/two
    helmVersion: 'v3.8.2'
    releaseName: two
    namespace: ${{ inputs.namespace }}
  id: bake-two

Version

  • I am using the latest version

Runner

ubuntu-20.04

Relevant log output

From the first step:

##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'helm_version'
##[debug]=> 'v3.8.2'
##[debug]Result: 'v3.8.2'
##[debug]Loading env
##[debug]isExplicit: 3.8.2
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/helm/3.8.2/x64
##[debug]not found
##[debug]Downloading helm version v3.8.2
##[debug]isExplicit: 3.8.2
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/helm/3.8.2/x64
##[debug]not found
##[debug]Downloading https://get.helm.sh/helm-v3.8.2-linux-amd64.zip
##[debug]Destination /home/runner/work/_temp/a2fc0041-7f26-4f83-8bb0-9e8b278fe3fa
##[debug]download complete
/usr/bin/unzip -o /home/runner/work/_temp/a2fc0041-7f26-4f83-8bb0-9e8b278fe3fa
Archive:  /home/runner/work/_temp/a2fc0041-7f26-4f83-8bb0-9e8b278fe3fa
   creating: linux-amd64/
  inflating: linux-amd64/helm        
  inflating: linux-amd64/LICENSE     
  inflating: linux-amd64/README.md   
##[debug]Caching tool helm 3.8.2 x64
##[debug]source dir: /home/runner/work/_temp/7f48691e-708f-4b3b-bfda-3d19755[62](https://github.com/_/_/actions/runs/5070527400/jobs/9106346737#step:3:63)b50
##[debug]destination /opt/hostedtoolcache/helm/3.8.2/x[64](https://github.com/_/_/actions/runs/5070527400/jobs/9106346737#step:3:65)
##[debug]finished caching tool
##[debug]LICENSE
##[debug]README.md
##[debug]helm
##[debug]Helm executable path /opt/hostedtoolcache/helm/3.8.2/x64/linux-amd64/helm

From the second step:

##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'helm_version'
##[debug]=> 'v3.8.2'
##[debug]Result: 'v3.8.2'
##[debug]Loading env
##[debug]isExplicit: 3.8.2
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/helm/3.8.2/x64
##[debug]Found tool in cache helm 3.8.2 x64
##[debug]Helm executable path /opt/hostedtoolcache/helm/3.8.2/x64
@jferris jferris added the bug Something isn't working label May 24, 2023
jferris added a commit to thoughtbot/k8s-bake that referenced this issue May 24, 2023
When running a specific version of Helm, if that version already exists
in the cache, the action will attempt to run the Helm cache directory
without an executable, which fails.

This updates the logic for finding an existing version in the cache to
append the executable name and extension.

Resolves Azure#84.
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Jun 7, 2023
davidgamero pushed a commit that referenced this issue Mar 7, 2024
When running a specific version of Helm, if that version already exists
in the cache, the action will attempt to run the Helm cache directory
without an executable, which fails.

This updates the logic for finding an existing version in the cache to
append the executable name and extension.

Resolves #84.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idle Inactive for 14 days
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant