Skip to content

golang: toolchain not available #3149

Description

@nijel

search you tried in the issue tracker

toolchain not available

describe your issue

helm-docs 1.13 has been switched in norwoodj/helm-docs@4a68682 to use go 1.22 and now it fails in pre-commit:

build attempt 1...
    => error
    [INFO] Installing environment for https://github.com/norwoodj/helm-docs.
    [INFO] Once installed this environment will be reused.
    [INFO] This may take a few minutes...
    An unexpected error has occurred: CalledProcessError: command: ('/opt/go/bin/go', 'install', './...')
    return code: 1
    stdout: (none)
    stderr:
        go: downloading go1.22 (linux/amd64)
        go: download go1.22 for linux/amd64: toolchain not available
    Check the log at /pc/pre-commit.log

Seen on pre-commit.ci at https://results.pre-commit.ci/run/github/260481808/1710232815.fRXg_2QpTiahEGKp7QY3UQ and GitHub actions at https://github.com/WeblateOrg/helm/actions/runs/8245873073/job/22550706357?pr=419.

While I can probably fix this on GitHub by installing newer go, I cannot do this on https://pre-commit.ci/. But I also have no clue how this is supposed to work.

Possibly related golang issue: golang/go#61455

pre-commit --version

pre-commit 3.6.2

.pre-commit-config.yaml

repos:
- repo: https://github.com/norwoodj/helm-docs
  rev: v1.13.1
  hooks:
  - id: helm-docs-built

~/.cache/pre-commit/pre-commit.log (if present)

No response

Activity

  1. asottile commented on Mar 12, 2024

    @asottile
    Member

    have you tried language_version ?

  2. nijel commented on Mar 12, 2024

    @nijel
    Author

    No, but did it now, and it seems to have helped: https://results.pre-commit.ci/run/github/260481808/1710248967.AH_EddU3T-SaGsr6mFKXRQ Thanks.

  3. asottile commented on Mar 12, 2024

    @asottile
    Member

    might have been able to get to there from the docs: https://pre-commit.com/#golang

  4. nijel commented on Mar 12, 2024

    @nijel
    Author

    If I knew that installing the matching go version is an expected thing to do, I might have found that. But the error message made me think that it should have been downloaded automatically, and I didn't really investigate that direction…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions