-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Tar ownership issues installing 1.19.1 in Docker #752
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
Comments
Hi @eatonphil thanks for the report! I tried reproducing locally with the following Dockerfile contents but was unable to trigger this issue. FROM golang:1.12.10
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
sh -s -- -b $(go env GOPATH)/bin v1.19.1 Can you provide any additional details about the CI environment you are using (docker version, CI system, etc.)? Having a bit more information may help us pinpoint the issue. |
Hi, I'm seeing the same issue with this in Circle CI. Here is a failing build.. https://circleci.com/gh/lawrencegripper/azbrowse/281 The build is: and the script it runs is I'm going to play around and see if I can get this working, will post back what I find. |
So using the SSH to failed agent I can run the following and get a failure
But if I run v1.18.0 or v1.19.0 all is well
|
This seems like a good writeup of what's going on in a different context. microsoft/vscode-remote-release#28 (comment) Maybe the changes to how GoReleaser is run as part of v1.19.1 have caused the file ownership in the tars to be different. c427c61#diff-b67911656ef5d18c4ae36cb6741b7965L63 Yeah looks like this may be the cause. Here is a comparison between the two Still no clear why this affects CircleCI but doesn't occur locally when running in docker. |
This explains why this occurs in CircleCI and not locally. TLDR:
|
Here is a quick workaround, using the following command you can add the required
I've added a PR to the |
@eatonphil, @lawrencegripper I did a quick check against the last few release versions and it definitely seems like a change in the permissions in how the archives were generated. $ tar vtf golangci-lint-1.17.1-linux-amd64.tar.gz
-rw-rw-r-- travis/travis 35148 2019-06-10 04:56 golangci-lint-1.17.1-linux-amd64/LICENSE
-rw-rw-r-- travis/travis 54000 2019-06-10 04:57 golangci-lint-1.17.1-linux-amd64/README.md
-rwxrwxr-x travis/travis 20808352 2019-06-10 05:07 golangci-lint-1.17.1-linux-amd64/golangci-lint
$ tar vtf golangci-lint-1.18.0-linux-amd64.tar.gz
-rw-r--r-- denis/staff 35148 2019-01-20 14:58 golangci-lint-1.18.0-linux-amd64/LICENSE
-rw-r--r-- denis/staff 57692 2019-09-10 05:05 golangci-lint-1.18.0-linux-amd64/README.md
-rwxr-xr-x denis/staff 20176896 2019-09-10 05:37 golangci-lint-1.18.0-linux-amd64/golangci-lint
$ tar vtf golangci-lint-1.19.0-linux-amd64.tar.gz
-rw-r--r-- denis/staff 35148 2019-01-20 14:58 golangci-lint-1.19.0-linux-amd64/LICENSE
-rw-r--r-- denis/staff 56557 2019-09-23 15:46 golangci-lint-1.19.0-linux-amd64/README.md
-rwxr-xr-x denis/staff 21110784 2019-09-23 16:40 golangci-lint-1.19.0-linux-amd64/golangci-lint
$ tar vtf golangci-lint-1.19.1-linux-amd64.tar.gz
-rw-r--r-- denis-isaev/LD\Domain Users 35148 2019-01-18 00:33 golangci-lint-1.19.1-linux-amd64/LICENSE
-rw-r--r-- denis-isaev/LD\Domain Users 56557 2019-09-24 05:12 golangci-lint-1.19.1-linux-amd64/README.md
-rwxr-xr-x denis-isaev/LD\Domain Users 21356544 2019-09-25 10:37 golangci-lint-1.19.1-linux-amd64/golangci-lint I suspect the issue has something to do with how the latest
@jirfag Thoughts? |
I did one last extended check on the last two release tars. $ tar xf golangci-lint-1.19.0-linux-amd64.tar.gz --to-command 'echo $TAR_FILENAME:$TAR_UID:$TAR_GID'
golangci-lint-1.19.0-linux-amd64/LICENSE:501:50
golangci-lint-1.19.0-linux-amd64/README.md:501:50
golangci-lint-1.19.0-linux-amd64/golangci-lint:501:50
$ tar xf golangci-lint-1.19.1-linux-amd64.tar.gz --to-command 'echo $TAR_FILENAME:$TAR_UID:$TAR_GID'
golangci-lint-1.19.1-linux-amd64/LICENSE:1678343834:593637566
golangci-lint-1.19.1-linux-amd64/README.md:1678343834:593637566
golangci-lint-1.19.1-linux-amd64/golangci-lint:1678343834:593637566 The most recent v1.19.1 release has extremely large uids/gids which is possibly overflowing the allowable range on some systems. There's a note about this in the Go stdlib and some related code to handle this. I haven't dug deeper to investigate exactly what is happening here. see: |
@tpounds outlined it above, the I did a PR to That's been merged so if you pull in that change and regen |
@lawrencegripper Thanks! I've opened pr #772 to update to the latest |
Reopening until we recreate /cc @jirfag |
@eatonphil, @lawrencegripper This should now be fixed in newer releases >= 1.20.x but please report back if you continue experiencing issues. |
Awesome, thanks :) |
Hi! I am trying to install golangci-lint in a Go 1.12.10 debian image. When upgrading to 1.19.1 I am seeing errors trying to change ownership during install. Googling around suggests there is a tar command running without --no-same-owner.
I cannot replicate this locally because I must have more permissive Docker daemon privileges set up. But currently I'm unable to use 1.19.1 in a CI environment. 1.17.1 did not have this issue.
The text was updated successfully, but these errors were encountered: