sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.89k stars 2.14k forks source link

CI failure in github release due to go version of executor #2962

Closed kkimurak closed 4 months ago

kkimurak commented 4 months ago

(search work in progress)

We use [cimg/go:1.14] for github-release but it does not compatible with recent release. Maybe we should update the image tag

cc: @sachilles

kkimurak commented 4 months ago

Note:

running on host

for go_version in 1.{14..22}; do
  echo "- "${go_version}"
  docker run -a STDOUT -a STDERR --rm cimg/go:${go_version} go get github.com/meterup/github-release 2>&1 | tee go_${go_version}.log
done

1.14 (current setting) and 1.15 fails with same error

# github.com/github-release/github-release/vendor/github.com/kevinburke/rest/restclient
../go/src/github.com/github-release/github-release/vendor/github.com/kevinburke/rest/restclient/client.go:204:18: undefined: io.ReadAll
../go/src/github.com/github-release/github-release/vendor/github.com/kevinburke/rest/restclient/client.go:218:18: undefined: io.ReadAll

io.ReadAll is added on go 1.16 so it is acceptable

kkimurak commented 4 months ago

1.16 : not sure it works - is the final line non-critical warning?

go: downloading github.com/meterup/github-release v0.7.5
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: downloading github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: downloading github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
go: downloading github.com/inconshreveable/log15 v3.0.0-testing.5+incompatible
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/go-stack/stack v1.8.1
go: downloading golang.org/x/term v0.13.0
go: downloading github.com/mattn/go-isatty v0.0.16
go: downloading golang.org/x/sys v0.14.0
../go/pkg/mod/github.com/mattn/go-isatty@v0.0.16/isatty_tcgets.go:7:8: //go:build comment without // +build comment
kkimurak commented 4 months ago

1.17: may work but command should be updated to use go install instead of go get as it have been deprecated.

go: downloading github.com/meterup/github-release v0.7.5
go: downloading github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: downloading github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
go: downloading github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/inconshreveable/log15 v3.0.0-testing.5+incompatible
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading golang.org/x/term v0.13.0
go: downloading github.com/go-stack/stack v1.8.1
go: downloading golang.org/x/sys v0.14.0
go: downloading github.com/mattn/go-isatty v0.0.16
go get: installing executables with 'go get' in module mode is deprecated.
    Use 'go install pkg@version' instead.
    For more information, see https://golang.org/doc/go-get-install-deprecation
    or run 'go help get' or 'go help install'.

since 1.18 it result in error (tested from 1.18 to 1.22)

go: go.mod file not found in current directory or any parent directory.
    'go get' is no longer supported outside a module.
    To build and install a command, use 'go install' with a version,
    like 'go install example.com/cmd@latest'
    For more information, see https://golang.org/doc/go-get-install-deprecation
    or run 'go help get' or 'go help install'.
kkimurak commented 4 months ago

replace go get to go install, add trailing @latest to github.com/meterup/github-release and try 1.17..1.22. There are minor difference (1.22 seems to have less dependencies) but all versions seem to be work.

for go_version in 1.{17..22}; do
  echo "- "${go_version}"
  docker run -a STDOUT -a STDERR --rm cimg/go:${go_version} go install github.com/meterup/github-release 2>&1 | tee go_${go_version}.log
done

log for 1.17

go: downloading github.com/meterup/github-release v0.7.5
go: finding module for package github.com/tomnomnom/linkheader
go: finding module for package github.com/voxelbrain/goptions
go: finding module for package github.com/dustin/go-humanize
go: finding module for package github.com/kevinburke/rest
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: downloading github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
go: downloading github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: found github.com/dustin/go-humanize in github.com/dustin/go-humanize v1.0.1
go: found github.com/voxelbrain/goptions in github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: found github.com/kevinburke/rest in github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: found github.com/tomnomnom/linkheader in github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
go: downloading github.com/inconshreveable/log15 v3.0.0-testing.5+incompatible
go: downloading github.com/go-stack/stack v1.8.1
go: downloading golang.org/x/term v0.13.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading golang.org/x/sys v0.14.0
go: downloading github.com/mattn/go-isatty v0.0.16

log for 1.22

go: downloading github.com/meterup/github-release v0.7.5
go: finding module for package github.com/tomnomnom/linkheader
go: finding module for package github.com/dustin/go-humanize
go: finding module for package github.com/kevinburke/rest
go: finding module for package github.com/voxelbrain/goptions
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
go: downloading github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: downloading github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: found github.com/dustin/go-humanize in github.com/dustin/go-humanize v1.0.1
go: found github.com/voxelbrain/goptions in github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2
go: found github.com/kevinburke/rest in github.com/kevinburke/rest v0.0.0-20240617045629-3ed0ad3487f0
go: found github.com/tomnomnom/linkheader in github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
kkimurak commented 4 months ago

Log for failed CI job : https://app.circleci.com/jobs/github/sameersbn/docker-gitlab/7095

kkimurak commented 4 months ago

Submit a PR #2963

sachilles commented 4 months ago

Thanks for providing the PR, which has also been cherry-picked in the latest support branches (support/16.11.x and support/17.0.x).

kkimurak commented 4 months ago

Thank you for the backport. Let's check if the release works as before.

kkimurak commented 4 months ago

Release entries for 17.1.0-1, 17.0.3-1 and 16.11.5-1 are published. Thank you for your work. Closing.