Azure / k8s-bake

GitHub Action creating Kubernetes manifest files with Helm, Kustomize, or Kompose
MIT License
52 stars 33 forks source link

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

Closed jferris closed 7 months ago

jferris commented 1 year ago

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

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
github-actions[bot] commented 1 year ago

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