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

Check Format GitHub Action is failing #1314

Closed
AObuchow opened this issue Sep 10, 2024 · 3 comments · Fixed by #1315
Closed

Check Format GitHub Action is failing #1314

AObuchow opened this issue Sep 10, 2024 · 3 comments · Fixed by #1315

Comments

@AObuchow
Copy link
Collaborator

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:

  • Pin go imports to v0.24.0 instead of latest
  • Upgrade to go 1.22 throughout the repo, as it's supported in our runner image.
@AObuchow
Copy link
Collaborator Author

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

  • Temporarily pin go imports to v0.24.0 instead of latest (to unblock pending PRs)
  • After the upstream release, I can submit a PR to upgrade to go 1.22 throughout the repo and unpin set-envtest. This is a bit more of a delicate process, and I don't want it to block the DWO release.

AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Sep 10, 2024
Fix devfile#1314

The latest version of goimports (v0.25.0) requires go >= 1.22.0.

Since we are about to do the upstream release of DWO 0.31.0, we are
temporarily pinning goimports to the last working version (v0.24.0).

After the 0.31.0 release of DWO, we can safely upgrade the entire
repo to go 1.22.0, and use the latest version of goimports again.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Sep 10, 2024
Part of devfile#1314

The latest version of goimports (v0.25.0) requires go >= 1.22.0.

Since we are about to do the upstream release of DWO 0.31.0, we are
temporarily pinning goimports to the last working version (v0.24.0).

After the 0.31.0 release of DWO, we can safely upgrade the entire
repo to go 1.22.0, and use the latest version of goimports again.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
dkwon17 pushed a commit that referenced this issue Sep 10, 2024
Part of #1314

The latest version of goimports (v0.25.0) requires go >= 1.22.0.

Since we are about to do the upstream release of DWO 0.31.0, we are
temporarily pinning goimports to the last working version (v0.24.0).

After the 0.31.0 release of DWO, we can safely upgrade the entire
repo to go 1.22.0, and use the latest version of goimports again.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
@AObuchow
Copy link
Collaborator Author

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 AObuchow reopened this Sep 11, 2024
@AObuchow
Copy link
Collaborator Author

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: #1316

AObuchow added a commit to mancubus77/devworkspace-operator that referenced this issue Sep 16, 2024
Part of devfile#1314

The latest version of goimports (v0.25.0) requires go >= 1.22.0.

Since we are about to do the upstream release of DWO 0.31.0, we are
temporarily pinning goimports to the last working version (v0.24.0).

After the 0.31.0 release of DWO, we can safely upgrade the entire
repo to go 1.22.0, and use the latest version of goimports again.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant