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

Error: Failed to download Helm from location https://get.helm.sh/helm-v1.2.1-linux-amd64.zip #99

Closed
1 task done
jsjoeio opened this issue Oct 24, 2022 · 12 comments · Fixed by clusterpedia-io/clusterpedia-helm#15
Labels
bug Something is not working

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Oct 24, 2022

What happened?

Run azure/setup-helm@v3.3
Downloading v1.2.1
  Error: Error: Failed to download Helm from location https://get.helm.sh/helm-v1.2.1-linux-amd[6](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478016380#step:4:7)4.zip

Version

  • I am using the latest version

Runner

Ubuntu 20.04.5

Relevant log output

##[debug]Evaluating condition for step: 'Install helm'
##[debug]Evaluating: (success() && (steps.changed-files.outputs.any_changed == 'true'))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating Equal:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating Index:
##[debug]..........Evaluating steps:
##[debug]..........=> Object
##[debug]..........Evaluating String:
##[debug]..........=> 'changed-files'
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'outputs'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'any_changed'
##[debug]....=> 'true'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (true && ('true' == 'true'))
##[debug]Result: true
##[debug]Starting: Install helm
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run azure/setup-helm@v3.3
  
::group::Downloading v1.[2](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781#step:4:2).1
Downloading v1.2.1
  ##[debug]isExplicit: 1.2.1
  ##[debug]explicit? true
  ##[debug]checking cache: /opt/hostedtoolcache/helm/1.2.1/x64
  ##[debug]not found
  ##[debug]Downloading https://get.helm.sh/helm-v1.2.1-linux-amd64.zip
  ##[debug]Downloading /home/runner/work/_temp/7[3](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781#step:4:3)8081a7-2c00-[4](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781#step:4:4)e8b-8118-a9822f6644a[5](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781#step:4:5)
  ##[debug]Failed to download from "https://get.helm.sh/helm-v1.2.1-linux-amd[6](https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781#step:4:6)4.zip". Code(404) Message(Not Found)
  Error: Error: Failed to download Helm from location https://get.helm.sh/helm-v1.2.1-linux-amd64.zip
  ##[debug]Node Action run completed with exit code 1
  ##[debug]Finishing: Install helm

https://github.com/coder/code-server/actions/runs/3316135595/jobs/5478071781

@jsjoeio jsjoeio added the bug Something is not working label Oct 24, 2022
@uchinda-sph
Copy link

facing the same issue

@ethan-k
Copy link

ethan-k commented Oct 25, 2022

Faced the same issue but replaced azure/setup-helm with the below code for now

      - name: Install Helm
        run: |
          curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

@dotrieutan
Copy link

got same problem, the download link was updated or something ?

@jmd9019
Copy link

jmd9019 commented Oct 25, 2022

Getting same problem

Adding version solved it

      - name: Helm installer
        uses: Azure/setup-helm@v3
        with:
          version: 'v3.10.1'

@vdhpieter
Copy link

vdhpieter commented Oct 25, 2022

They relied on the default ordering of the GH GQL api and that probably got changed...

Changing the query used here and loosing the reverse (why do that if the API can do it for you?):

setup-helm/src/run.ts

Lines 58 to 73 in b70d33f

const {repository} = await graphqlAuthenticated(
`
{
repository(name: "helm", owner: "helm") {
releases(last: 100) {
nodes {
tagName
}
}
}
}
`
)
const releases: string[] = repository.releases.nodes
.reverse()
.map((node: {tagName: string}) => node.tagName)

query {      
  repository(name: "helm", owner: "helm") {
    releases(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        tagName
      }
    }
  }
}

Maybe I find time to PR this, but if somebody wants to do it be my guest!

jsjoeio added a commit to coder/code-server that referenced this issue Oct 25, 2022
Due to Azure/setup-helm#99, this pins the
version to v3.10.1 as a temporary fix.
repo-ranger bot pushed a commit to coder/code-server that referenced this issue Oct 25, 2022
Due to Azure/setup-helm#99, this pins the
version to v3.10.1 as a temporary fix.
@marcindabrowski
Copy link

But even when an order is added some computation of the latest need to be done. The latest could be some patch for previous major/minor.

carslen added a commit to mercedes-benz/eclipse-tractusx.github.io that referenced this issue Oct 26, 2022
@sverweij
Copy link

sverweij commented Oct 26, 2022

@marcindabrowski / @vdhpieter we might want to use the isLatest attribute from the GitHub API for this. See - graphql/reference/objects#release.

So a slight modification to @vdhpieter 's query ...

query {
  repository(name: "helm", owner: "helm") {
    releases(first: 10, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        tagName
        isLatest
        isDraft
        isPrerelease
      }
    }
  }
}

... and then adapting the processing (ref: src/run.ts#L71-L75 might do the trick:

      // ...
      const latestValidRelease: string = repository.releases.nodes
         .find(
            ({tagName, isLatest, isDraft, isPreRelease}) => 
                isValidVersion(tagName) && isLatest && !isDraft && !isPreRelease
          )?.tagName

      if (latestValidRelease) return latestValidRelease
      // ...

Related: recent announcement that the meaning of the isLatest attribute has changed a bit since it was introduced.

Edit: PR #100 seems to fix this issue (even without the above suggestions). I've taken the liberty to leave above suggestions as review comments hoping I didn't violate any community conventions ...

@OliverMKing
Copy link
Collaborator

#100 will be merged in and released shortly. That fixes this issue. Thanks everyone for the help!

@ImRodry
Copy link

ImRodry commented Oct 27, 2022

The linked PR was merged but this still isn’t resolved, are we waiting for anything else?

@vdhpieter
Copy link

@ImRodry the PR (#100) is not yet merged

@ImRodry
Copy link

ImRodry commented Oct 27, 2022

Ah ok was looking at clusterpedia-io/clusterpedia-helm#15
Do you have an ETA for when that will be merged?

@OliverMKing
Copy link
Collaborator

OliverMKing commented Oct 27, 2022

This has been fixed and released in v3.4 (and v3). Please upgrade to one of these versions. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants