devfile / devworkspace-operator

Apache License 2.0
67 stars 55 forks source link

Check Format GitHub Action is failing #1314

Closed AObuchow closed 2 months ago

AObuchow commented 2 months ago

The GitHub Action's that check the format of the repo's go code are currently failing with:

go: downloading golang.org/x/tools v0.25.0
go: golang.org/x/tools/cmd/goimports@latest (in golang.org/x/tools@v0.25.0): go.mod:3: invalid go version '1.22.0': must match format 1.23

I believe this is because we use an outdated Go version throughout the repo. I quickly tried to install goimports@latest in an "empty workspace" in Che:

$ go install golang.org/x/tools/cmd/goimports@latest
go: downloading golang.org/x/tools v0.25.0
go: golang.org/x/tools/cmd/goimports@latest: golang.org/x/tools@v0.25.0 requires go >= 1.22.0 (running go 1.21.11; GOTOOLCHAIN=local)

Originally, we kept this version of Go because Go 1.22 had not yet been released for Fedora 40, and I didn't want to break the local workflows of developers using Fedora.

Two solutions that come to mind:

AObuchow commented 2 months ago

@dkwon17 Since we're aiming to release DWO 0.31.0 today, what do you think about:

AObuchow commented 2 months ago

Re-opening this issue so we can remember to proceed with the more permanent solution of upgrading the repo to go 1.22 throughout the repo.

AObuchow commented 2 months ago

Re-opening this issue so we can remember to proceed with the more permanent solution of upgrading the repo to go 1.22 throughout the repo.

Never mind, I decided to make a separate issue for this: https://github.com/devfile/devworkspace-operator/issues/1316