Skip to content

[BUG]: GoTool@0 doesn't support downloading Go 1.21 or above. #19690

@matthchr

Description

@matthchr
Member

New issue checklist

Task name

GoTool

Task version

0

Issue Description

GoTool tries to download all Golang releases from a path like: https://storage.googleapis.com/golang/go1.22.linux-amd64.tar.gz, but after Go 1.20 there are no longer published binaries at this path. Instead the URL https://golang.org/dl/ should be used, as you can see on the official Golang site: https://go.dev/dl/

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
    Microsoft Hosted
    VMSS Pool
    Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu latest

Relevant log output

Starting: Get Go 1.22
==============================================================================
Task         : Go tool installer
Description  : Find in cache or download a specific version of Go and add it to the PATH
Version      : 0.231.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/go-tool
==============================================================================
Downloading: https://storage.googleapis.com/golang/go1.22.linux-amd64.tar.gz
##[error]Failed to download version 1.22. Please verify that the version is valid and resolve any other issues. Error: Unexpected HTTP response: 404
    at Object.<anonymous> (/home/vsts/work/_tasks/GoTool_334727f4-9495-4f9d-a391-fc621d671474/0.231.0/node_modules/azure-pipelines-tool-lib/tool.js:216:31)
    at Generator.next (<anonymous>)
    at fulfilled (/home/vsts/work/_tasks/GoTool_334727f4-9495-4f9d-a391-fc621d671474/0.231.0/node_modules/azure-pipelines-tool-lib/tool.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  httpStatusCode: 404
}
Finishing: Get Go 1.22

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

- task: GoTool@0
      displayName: Get Go 1.22
      inputs:
        version: '1.22'

Activity

TrevorChristman

TrevorChristman commented on Apr 22, 2024

@TrevorChristman

Hi, I'm having this problem also, and I'm unable to consume go 1.22.

Is there any workaround? Is there any schedule for correcting the GoTool step?

huliang-microsoft

huliang-microsoft commented on May 3, 2024

@huliang-microsoft

I have the same issue, will this be fixed?

debben

debben commented on May 7, 2024

@debben

I'm having a similar issue but I'm wondering if for the fix here, the download URL could be configurable either as an input or overridden with an environment variable. In my case I have an artifactory instance acting as a proxying cache for requests to https://storage.googleapis.com/golang/%s. Also, is it possible to support wildcarded versions (1.22.*) similar to some of the dotnet tasks? I frequently re-bake runner images and the way that installer works is to grab the highest patch version
https://github.com/actions/runner-images/blob/584c7c0fef943495221b46033addefb6419ecb0f/images/ubuntu/toolsets/toolset-2204.json#L46C1-L48C25

RichardChen820

RichardChen820 commented on May 27, 2024

@RichardChen820

I'm stumbling over the same problem, any plan to fix or workaround?

enzobrands

enzobrands commented on May 28, 2024

@enzobrands

Adding the patch version (1.22.3) to the version variable does work, if that helps anyone.

sevenate

sevenate commented on Aug 13, 2024

@sevenate

It would be nice to have a "latest" as a valid input argument for version parameter for cases when you don't really care.

nikolaigut

nikolaigut commented on Aug 15, 2024

@nikolaigut

I had the same problem. @enzobrands solution worked.

github-actions

github-actions commented on Feb 11, 2025

@github-actions

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

TrevorChristman

TrevorChristman commented on Feb 11, 2025

@TrevorChristman

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Come on my dudes, we're better than this.

3 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @debben@sevenate@thiagodemoura@matthchr@enzobrands

      Issue actions

        [BUG]: GoTool@0 doesn't support downloading Go 1.21 or above. · Issue #19690 · microsoft/azure-pipelines-tasks