Skip to content

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

Open
@matthchr

Description

@matthchr

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'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions