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

Move to cimg/go #29

Closed
wants to merge 2 commits into from
Closed

Move to cimg/go #29

wants to merge 2 commits into from

Conversation

hanzei
Copy link
Contributor

@hanzei hanzei commented Nov 22, 2021

@hanzei hanzei added the Work In Progress Not yet ready for review label Nov 22, 2021
@@ -10,7 +10,7 @@ orbs:
executors:
default:
docker:
- image: circleci/golang:1.17.3-node
- image: cimg/go:1.17.3-node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mickmister
Copy link
Contributor

/update-branch

@@ -137,7 +137,7 @@ jobs:

deploy-ci:
docker:
- image: circleci/python:2.7
- image: cimg/python:2.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @hanzei ! Can we move the python image too to 3.X? I think python 2.X is deprecated already.

@mickmister
Copy link
Contributor

I was trying to update circleci to support Go 1.18, in order to import the current server version that depends on Go 1.18. I ran into some errors in CI when I tried to use the cimg/[email protected] image https://app.circleci.com/pipelines/github/mattermost/mattermost-plugin-zoom/1936/workflows/42c880ba-7af5-420c-ae55-978a4c8a89fe/jobs/6041

golangci-lint run ./...
WARN [runner] Can't run linter goanalysis_metalinter: bodyclose: failed prerequisites: [[email protected]/mattermost/mattermost-plugin-zoom/server/zoom: analysis skipped: errors in package: [/home/circleci/project/server/zoom/client.go:7:2: could not import encoding/json (/usr/local/go/src/encoding/json/decode.go:11:2: could not import encoding (-: could not load export data: cannot import "encoding" (unknown iexport format version 2), export data is newer version - update tool)) /home/circleci/project/server/zoom/client.go:9:2: could not import github.com/mattermost/mattermost-server/v6/model (/home/circleci/go/pkg/mod/github.com/mattermost/mattermost-server/[email protected]/model/access.go:7:2: could not import net/http (/usr/local/go/src/net/http/client.go:13:2: could not import context (/usr/local/go/src/context/context.go:51:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool)))))) /home/circleci/project/server/zoom/client.go:10:2: could not import github.com/pkg/errors (/home/circleci/go/pkg/mod/github.com/pkg/[email protected]/errors.go:96:2: could not import fmt (/usr/local/go/src/fmt/errors.go:7:8: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool))))) /home/circleci/project/server/zoom/client.go:11:2: could not import golang.org/x/oauth2 (/home/circleci/go/pkg/mod/golang.org/x/[email protected]/oauth2.go:12:2: could not import bytes (/usr/local/go/src/bytes/buffer.go:10:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool))))) /home/circleci/project/server/zoom/jwt.go:7:2: could not import bytes (/usr/local/go/src/bytes/buffer.go:10:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool)))) /home/circleci/project/server/zoom/jwt.go:9:2: could not import fmt (/usr/local/go/src/fmt/errors.go:7:8: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool)))) /home/circleci/project/server/zoom/jwt.go:10:2: could not import net/http (/usr/local/go/src/net/http/client.go:13:2: could not import context (/usr/local/go/src/context/context.go:51:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool))))) /home/circleci/project/server/zoom/jwt.go:12:6: could not import github.com/dgrijalva/jwt-go (/home/circleci/go/pkg/mod/github.com/dgrijalva/[email protected]+incompatible/claims.go:4:2: could not import crypto/subtle (-: could not load export data: cannot import "crypto/subtle" (unknown iexport format version 2), export data is newer version - update tool)) /home/circleci/project/server/zoom/oauth.go:8:2: could not import context (/usr/local/go/src/context/context.go:51:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool)))) /home/circleci/project/server/zoom/oauth.go:11:2: could not import io/ioutil (/usr/local/go/src/io/ioutil/ioutil.go:14:2: could not import io (/usr/local/go/src/io/io.go:16:2: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool))))) /home/circleci/project/server/zoom/oauth.go:13:2: could not import time (/usr/local/go/src/time/format.go:7:8: could not import errors (/usr/local/go/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/go/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool))))]] 
WARN [runner] Can't run linter unused: buildir: failed to load package goarch: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool 
ERRO Running error: buildir: failed to load package goarch: could not load export data: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool 
make: *** [Makefile:47: golangci-lint] Error 3

Related issues
golangci/golangci-lint#995
golangci/golangci-lint-action#434

The solutions to this have been effectively "update whatever tool you are using". The message "update tool" is even in the error message itself. We call golangci directly from the CLI, so I'm thinking this means we need to update golangci itself.

@JulienTant
Copy link
Member

JulienTant commented Sep 8, 2022

I did the update "manually" yesterday in the circleci file for the nps-plugin, in additional to targeting go118 I had to:

  • update golangci-lint 1.46.2
  • changed the gobin variable in golangci-lint install section to /usr/local/bin
  • disable fieldalignment from govet

And I think everything else was working fine! ref https://github.com/mattermost/mattermost-plugin-nps/pull/90/files

@hanzei
Copy link
Contributor Author

hanzei commented Sep 18, 2022

Closing in favour of #32

@mattermost mattermost locked and limited conversation to collaborators Sep 18, 2022
@mattermost mattermost unlocked this conversation Sep 18, 2022
@hanzei hanzei closed this Sep 18, 2022
@mattermod mattermod removed the Work In Progress Not yet ready for review label Sep 18, 2022
@hanzei hanzei deleted the cimg/go branch September 18, 2022 03:02
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 this pull request may close these issues.

6 participants