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

go private deps error on 1.3.0 #136

Closed
wyardley opened this issue Mar 16, 2021 · 25 comments
Closed

go private deps error on 1.3.0 #136

wyardley opened this issue Mar 16, 2021 · 25 comments

Comments

@wyardley
Copy link

wyardley commented Mar 16, 2021

After updating our on prem install from 1.2.0 to 1.3.0, I'm getting the following error on private go deps (we're using GHE, but it's github.com, i.e., regular cloud hosted GH, using a token). Prior to this update, updating go private deps was functioning.

This is running in Kubernetes, and we do have GOPRIVATE set in the environment to github.com/myorg. We also have GITHUB_APP_KEY and GITHUB_APP_ID set in the environment.

Command failed: go get -d ./...
go: errors parsing go.mod:
/tmp/renovate/github/myorg/somerepo/go.mod:10:2: require github.com/myorg/foobar: version "84b6a372087a" invalid: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/6dc0f0cc1ea814e6e7c7f091f4af19ee11bb593c074c7aedcc3835fd844375b8: exit status 128:
	fatal: could not read Username for 'https://github.com': terminal prompts disabled

Any suggestions on what could be causing this or a possible fix?

@rarkins
Copy link
Member

rarkins commented Mar 16, 2021

We changed to build this image using Renovate's open source "buildpack" rather than a custom build, so that could be a cause. But it could also potentially be a regression from Renovate OSS that hasn't been noticed by anyone using it.

Please confirm if the following is correct?

  • The repo you are running is a private github.com/myorg/somerepo
  • The dependency which fails is a private github.com/myorg/some-other-repo
  • github.com/myorg/some-other-repo is also installed for your Renovate app

@wyardley
Copy link
Author

Please confirm if the following is correct?
The repo you are running is a private github.com/myorg/somerepo
The dependency which fails is a private github.com/myorg/some-other-repo

Correct.

github.com/myorg/some-other-repo is also installed for your Renovate app

That would be typical, and I can confirm that in this case, the dependency itself also has Renovate install, but I can't guarantee that this is always the case. However, the token that Renovate is using should have access to the dep, and again, this was working before the buildpack changes.

@rarkins
Copy link
Member

rarkins commented Mar 16, 2021

That would be typical, and I can confirm that in this case, the dependency itself also has Renovate install, but I can't guarantee that this is always the case. However, the token that Renovate is using should have access to the dep, and again, this was working before the buildpack changes.

I would like us to elaborate on this point. If you are running on github.com, it is our assumption that the same app token is used for accessing other private github repos. The only way "the token that Renovate is using should have access to the dep" is if the dep is in a repo which has Renovate installed. But you write "I can't guarantee that this is always the case". Are you configuring some other github.com token somehow?

@wyardley
Copy link
Author

The only way "the token that Renovate is using should have access to the dep" is if the dep is in a repo which has Renovate installed. But you write "I can't guarantee that this is always the case". Are you configuring some other github.com token somehow?

We have the token GITHUB_PACKAGES_TOKEN defined as well, however, this was intended to be used with some specifics around trying to get private Java / Maven dependencies working, so I don't think it should line up with any env variable names that would have magic / default behavior w/r/t go deps.

@rarkins
Copy link
Member

rarkins commented Mar 16, 2021

I agree with you re: the token, but now I'm confused how this ever worked, because I would not expect it to work.

Let me step you through my logic, tell me if you spot anything mistaken:

So the only answers I see are:

  • You're mistaken and it didn't work for private repositories before, or
  • You ran the git insteadOf command yourself during package build?
  • I've made a mistake above

@wyardley
Copy link
Author

wyardley commented Mar 17, 2021

Assuming all the private deps do have the renovate app enabled, does all of that hold still? I can do some more research, but fairly confident it worked before.

You ran the git insteadOf command yourself during package build?

we are directly using the renovate built Docker image. Renovate itself updated it from 1.2.0 to 1.3.0, and nothing else in the kube deployment should have changed.

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

Assuming all the private deps do have the renovate app enabled, does all of that hold still?

The above all holds, which means I'm not sure how it could have ever worked. The same logic applies to Renovate OSS btw.

@viceice am I missing anything on the way go modules with private repos works? Please see above

Renovate itself updated it from 1.2.0 to 1.3.0, and nothing else in the kube deployment should have changed.

FYI Go changed from 1.15.6 to 1.16.2 between releases, although I have no reason to believe that would change anything related

@wyardley
Copy link
Author

wyardley commented Mar 17, 2021

I've got it now... we're using a mounted ssh config for private deps. So there's no token, but we've configured ssh to handle the private go packages.

So it's possible that the feature adding support for this (or some other unrelated change) is actually the issue.

Would it cause any issues with other parts of renovate to configure git to use ssh instead of https? Is there a way to do this that won't affect other aspects of Renovate's operations?

@viceice
Copy link
Collaborator

viceice commented Mar 17, 2021

who and where do you mount the ssh config?

@rarkins What base image was used before? I assume it was ubuntu 18.04 ?

So maybe it's a ssh change in ubuntu? Or maybe a ssh strictness because of the ~/.ssh permissions?

@wyardley
Copy link
Author

wyardley commented Mar 17, 2021

We’re doing roughly what’s outlined in the examples in the docs (https://docs.renovatebot.com/self-hosting/). Based on the error, it would seem like git is preferring http vs ssh.

You ran the git insteadOf command yourself during package build?

@rarkins: So, while we're not running it during build, we are also dropping in a .gitconfig to /home/ubuntu with

# [...]
[url "[email protected]:"]
  insteadOf = https://github.com

so you're somewhat right on this point (the ssh config and gitconfig explain how it worked before, that is).

I can try to troubleshoot it a bit more when I get a chance. ssh permissions should be correct.

What base image was used before? I assume it was ubuntu 18.04 ?

% for a in 2 3 ; do echo $a ; docker run --entrypoint=/bin/cat whitesource/renovate:1.$a.0 /etc/lsb-release ; done
2
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
3
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"

@viceice
Copy link
Collaborator

viceice commented Mar 17, 2021

@wyardley Can you build acustom renovate image and test?

FROM whitesource/renovate:1.3.0

USER root
RUN install-tool golang 1.15.10
USER 1000

This should override / downgrade golang, so we can make sure it's not a golang issue.

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

@rarkins What base image was used before? I assume it was ubuntu 18.04 ?

Yes, it went from Ubuntu 18.04 in 1.2.0 to Ubuntu 20.04 in 1.3.0 via the buildpack v4

@wyardley
Copy link
Author

This should override / downgrade golang, so we can make sure it's not a golang issue.

@rarkins: if I update go to 1.15.10 using your Dockerfile example above, it appears to resolve the problem, and verified that if I redeploy vanilla 1.3.0, I get the same artifact error. Another interesting bit - at least for an existing PR, go.mod still has the updated commit hash of the private lib, however, go.sum can't get updated and the artifact error shows up.

That said, if I exec in and directly run go 1.16, it seems to work as well (slightly sanitized) (maybe because it's already cached, but does still work if I run go clean -modcache first):

ubuntu@renovate-pro-webhook-957fdb7b6-hzgtb:/tmp/renovate/github/myorg/consuming-gitproject$ /usr/local/go/1.16.2/bin/go get -u  -v
go: downloading github.com/myorg/privatelib1 v0.0.0-20210315180028-newhash
[...]
go get: upgraded github.com/myorg/privatelib1 v0.0.0-20210304174032-oldhash => v0.0.0-20210315180028-newhash

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

@rarkins: if I update go to 1.15.10 using your Dockerfile example above

update = downgrade in this case, right?

What if you were to build the following?

FROM whitesource/renovate:1.3.0

USER root
RUN install-tool golang 1.16.2
USER 1000

and then:

FROM whitesource/renovate:1.3.0

USER root
RUN install-tool golang 1.15.10
RUN install-tool golang 1.16.2
USER 1000

Essentially I want to rule that it's not the act of reinstalling that's triggering 1.15.10 to work for you, rather than 1.15.10 vs 1.16.2.

@wyardley
Copy link
Author

update = downgrade in this case, right?

Sorry, yes.

Building the first option gives something like

 ---> Running in 97805c895a78
Installing tool golang v1.16.2
Skipping, already installed

I can try pushing / deploying if you want, but guessing that won't work since it's already not doing anything in that step?

The second:

RUN install-tool golang 1.15.10
RUN install-tool golang 1.16.2

does seem to work for me

I don't think it matters, but if I exec the container locally, neither go is in my $PATH; if I exec into the Kubernetes pod with /bin/bash, it's not -- however, that's been the case with older versions of Renovate as well, IIRC.

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

When you say the second works, do you mean the build works or the original problem of private repos is solved?

The container uses this entrypoint which sources the ENV: https://github.com/renovatebot/docker-buildpack/blob/master/src/base/bin/docker-entrypoint.sh. I'm not sure if exec follows the entrypoint? If not then it would explain the lack of path

@wyardley
Copy link
Author

When you say the second works, do you mean the build works or the original problem of private repos is solved?

Both - the build works, and if I run it, the original problem of private repos is solved.

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

That is incredibly weird. I'm going to rebuild 1.3.0 (same Dockerfile) and push an updated image to Docker Hub just in case it was a bad build affecting Go-only.

@wyardley
Copy link
Author

Agree that it's incredibly weird; I did try flipping back and forth a couple times, and fully deleting all the kube resources to make sure it wasn't a weird transient issue with a volume mount or something (also verified that the ssh config / git config were there). The good news is that I have my (hopefully temporary) self-built version that's fixing not only this issue, but the one mentioned in renovatebot/docker-buildpack#96, so can run with that for a while.

@rarkins
Copy link
Member

rarkins commented Mar 17, 2021

I've rebuilt and pushed. Also checked the build log for Go in particular:

install-tool golang 1.16.2
Step 22/45 : RUN install-tool golang 1.16.2
 ---> Running in 66c3774de2ea
Installing tool golang v1.16.2
Installing apt packages: bzr mercurial
Ign:1 http://binaries.erlang-solutions.com/debian focal InRelease
Get:2 http://binaries.erlang-solutions.com/debian focal Release [3132 B]
Get:3 http://binaries.erlang-solutions.com/debian focal Release.gpg [833 B]
Get:4 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Get:6 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease [23.8 kB]
Get:7 http://binaries.erlang-solutions.com/debian focal/contrib amd64 Packages [247 kB]
Get:8 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease [23.9 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:11 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages [3201 B]
Get:12 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [683 kB]
Get:14 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages [150 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [21.6 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [681 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [187 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1089 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [938 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [220 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [29.6 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4305 B]
Fetched 17.7 MB in 2s (7869 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  brz libmpdec2 libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib
  libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib mercurial-common
  python2 python2-minimal python2.7 python2.7-minimal python3 python3-breezy
  python3-certifi python3-configobj python3-dulwich python3-fastimport
  python3-minimal python3-six python3-urllib3 python3.8 python3.8-minimal
Suggested packages:
  brz-doc python3-breezy.tests kdiff3 | kdiff3-qt | kompare | meld | tkcvs
  | mgdiff qct python-mysqldb python-openssl python-pygments wish python2-doc
  python-tk python2.7-doc binutils binfmt-support python3-doc python3-tk
  python3-venv python3-breezy-dbg python3-kerberos python3-paramiko xdg-utils
  python-configobj-doc python3-gpg python3-cryptography python3-idna
  python3-openssl python3-socks python3.8-venv python3.8-doc
Recommended packages:
  python3-gpg python3-launchpadlib python3-github python3-gitlab
The following NEW packages will be installed:
  brz bzr libmpdec2 libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib
  libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib mercurial
  mercurial-common python2 python2-minimal python2.7 python2.7-minimal python3
  python3-breezy python3-certifi python3-configobj python3-dulwich
  python3-fastimport python3-minimal python3-six python3-urllib3 python3.8
  python3.8-minimal
0 upgraded, 26 newly installed, 0 to remove and 7 not upgraded.
Need to get 13.9 MB of archives.
After this operation, 63.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-minimal amd64 3.8.5-1~20.04.2 [715 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8-minimal amd64 3.8.5-1~20.04.2 [1899 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-minimal amd64 3.8.2-0ubuntu2 [23.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libmpdec2 amd64 2.4.2-3 [81.1 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-stdlib amd64 3.8.5-1~20.04.2 [1671 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8 amd64 3.8.5-1~20.04.2 [373 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 libpython3-stdlib amd64 3.8.2-0ubuntu2 [7068 B]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 python3 amd64 3.8.2-0ubuntu2 [47.6 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-minimal amd64 2.7.18-1~20.04.1 [335 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 python2.7-minimal amd64 2.7.18-1~20.04.1 [1285 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/universe amd64 python2-minimal amd64 2.7.17-2ubuntu4 [27.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython2.7-stdlib amd64 2.7.18-1~20.04.1 [1887 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 python2.7 amd64 2.7.18-1~20.04.1 [248 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/universe amd64 libpython2-stdlib amd64 2.7.17-2ubuntu4 [7072 B]
Get:15 http://archive.ubuntu.com/ubuntu focal/universe amd64 python2 amd64 2.7.17-2ubuntu4 [26.5 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-six all 1.14.0-2 [12.1 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-configobj all 5.0.6-4 [34.1 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-certifi all 2019.11.28-1 [149 kB]
Get:19 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-urllib3 all 1.25.8-2ubuntu0.1 [88.3 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/universe amd64 python3-dulwich amd64 0.19.15-1build1 [248 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/universe amd64 python3-fastimport all 0.9.8-5build1 [29.6 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/universe amd64 python3-breezy amd64 3.0.2-4ubuntu2 [1645 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/universe amd64 brz all 3.0.2-4ubuntu2 [38.1 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/universe amd64 bzr all 2.7.0+bzr6622+brz [4064 B]
Get:25 http://archive.ubuntu.com/ubuntu focal/universe amd64 mercurial-common all 5.3.1-1ubuntu1 [2650 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/universe amd64 mercurial amd64 5.3.1-1ubuntu1 [323 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 13.9 MB in 1s (9334 kB/s)
Selecting previously unselected package libpython3.8-minimal:amd64.
(Reading database ... 31240 files and directories currently installed.)
Preparing to unpack .../libpython3.8-minimal_3.8.5-1~20.04.2_amd64.deb ...
Unpacking libpython3.8-minimal:amd64 (3.8.5-1~20.04.2) ...
Selecting previously unselected package python3.8-minimal.
Preparing to unpack .../python3.8-minimal_3.8.5-1~20.04.2_amd64.deb ...
Unpacking python3.8-minimal (3.8.5-1~20.04.2) ...
Setting up libpython3.8-minimal:amd64 (3.8.5-1~20.04.2) ...
Setting up python3.8-minimal (3.8.5-1~20.04.2) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 31522 files and directories currently installed.)
Preparing to unpack .../python3-minimal_3.8.2-0ubuntu2_amd64.deb ...
Unpacking python3-minimal (3.8.2-0ubuntu2) ...
Selecting previously unselected package libmpdec2:amd64.
Preparing to unpack .../libmpdec2_2.4.2-3_amd64.deb ...
Unpacking libmpdec2:amd64 (2.4.2-3) ...
Selecting previously unselected package libpython3.8-stdlib:amd64.
Preparing to unpack .../libpython3.8-stdlib_3.8.5-1~20.04.2_amd64.deb ...
Unpacking libpython3.8-stdlib:amd64 (3.8.5-1~20.04.2) ...
Selecting previously unselected package python3.8.
Preparing to unpack .../python3.8_3.8.5-1~20.04.2_amd64.deb ...
Unpacking python3.8 (3.8.5-1~20.04.2) ...
Selecting previously unselected package libpython3-stdlib:amd64.
Preparing to unpack .../libpython3-stdlib_3.8.2-0ubuntu2_amd64.deb ...
Unpacking libpython3-stdlib:amd64 (3.8.2-0ubuntu2) ...
Setting up python3-minimal (3.8.2-0ubuntu2) ...
Selecting previously unselected package python3.
(Reading database ... 31898 files and directories currently installed.)
Preparing to unpack .../0-python3_3.8.2-0ubuntu2_amd64.deb ...
Unpacking python3 (3.8.2-0ubuntu2) ...
Selecting previously unselected package libpython2.7-minimal:amd64.
Preparing to unpack .../1-libpython2.7-minimal_2.7.18-1~20.04.1_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.18-1~20.04.1) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../2-python2.7-minimal_2.7.18-1~20.04.1_amd64.deb ...
Unpacking python2.7-minimal (2.7.18-1~20.04.1) ...
Selecting previously unselected package python2-minimal.
Preparing to unpack .../3-python2-minimal_2.7.17-2ubuntu4_amd64.deb ...
Unpacking python2-minimal (2.7.17-2ubuntu4) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../4-libpython2.7-stdlib_2.7.18-1~20.04.1_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../5-python2.7_2.7.18-1~20.04.1_amd64.deb ...
Unpacking python2.7 (2.7.18-1~20.04.1) ...
Selecting previously unselected package libpython2-stdlib:amd64.
Preparing to unpack .../6-libpython2-stdlib_2.7.17-2ubuntu4_amd64.deb ...
Unpacking libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ...
Setting up libpython2.7-minimal:amd64 (2.7.18-1~20.04.1) ...
Setting up python2.7-minimal (2.7.18-1~20.04.1) ...
Setting up python2-minimal (2.7.17-2ubuntu4) ...
Selecting previously unselected package python2.
(Reading database ... 32681 files and directories currently installed.)
Preparing to unpack .../00-python2_2.7.17-2ubuntu4_amd64.deb ...
Unpacking python2 (2.7.17-2ubuntu4) ...
Selecting previously unselected package python3-six.
Preparing to unpack .../01-python3-six_1.14.0-2_all.deb ...
Unpacking python3-six (1.14.0-2) ...
Selecting previously unselected package python3-configobj.
Preparing to unpack .../02-python3-configobj_5.0.6-4_all.deb ...
Unpacking python3-configobj (5.0.6-4) ...
Selecting previously unselected package python3-certifi.
Preparing to unpack .../03-python3-certifi_2019.11.28-1_all.deb ...
Unpacking python3-certifi (2019.11.28-1) ...
Selecting previously unselected package python3-urllib3.
Preparing to unpack .../04-python3-urllib3_1.25.8-2ubuntu0.1_all.deb ...
Unpacking python3-urllib3 (1.25.8-2ubuntu0.1) ...
Selecting previously unselected package python3-dulwich.
Preparing to unpack .../05-python3-dulwich_0.19.15-1build1_amd64.deb ...
Unpacking python3-dulwich (0.19.15-1build1) ...
Selecting previously unselected package python3-fastimport.
Preparing to unpack .../06-python3-fastimport_0.9.8-5build1_all.deb ...
Unpacking python3-fastimport (0.9.8-5build1) ...
Selecting previously unselected package python3-breezy.
Preparing to unpack .../07-python3-breezy_3.0.2-4ubuntu2_amd64.deb ...
Unpacking python3-breezy (3.0.2-4ubuntu2) ...
Selecting previously unselected package brz.
Preparing to unpack .../08-brz_3.0.2-4ubuntu2_all.deb ...
Unpacking brz (3.0.2-4ubuntu2) ...
Selecting previously unselected package bzr.
Preparing to unpack .../09-bzr_2.7.0+bzr6622+brz_all.deb ...
Unpacking bzr (2.7.0+bzr6622+brz) ...
Selecting previously unselected package mercurial-common.
Preparing to unpack .../10-mercurial-common_5.3.1-1ubuntu1_all.deb ...
Unpacking mercurial-common (5.3.1-1ubuntu1) ...
Selecting previously unselected package mercurial.
Preparing to unpack .../11-mercurial_5.3.1-1ubuntu1_amd64.deb ...
Unpacking mercurial (5.3.1-1ubuntu1) ...
Setting up libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ...
Setting up libmpdec2:amd64 (2.4.2-3) ...
Setting up libpython3.8-stdlib:amd64 (3.8.5-1~20.04.2) ...
Setting up python3.8 (3.8.5-1~20.04.2) ...
Setting up libpython3-stdlib:amd64 (3.8.2-0ubuntu2) ...
Setting up python2.7 (2.7.18-1~20.04.1) ...
Setting up libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ...
Setting up python3 (3.8.2-0ubuntu2) ...
Setting up python2 (2.7.17-2ubuntu4) ...
Setting up python3-six (1.14.0-2) ...
Setting up python3-configobj (5.0.6-4) ...
Setting up python3-certifi (2019.11.28-1) ...
Setting up python3-urllib3 (1.25.8-2ubuntu0.1) ...
Setting up python3-dulwich (0.19.15-1build1) ...
Setting up mercurial-common (5.3.1-1ubuntu1) ...
Setting up python3-fastimport (0.9.8-5build1) ...
Setting up python3-breezy (3.0.2-4ubuntu2) ...
Setting up brz (3.0.2-4ubuntu2) ...
update-alternatives: using /usr/bin/brz to provide /usr/bin/bzr (bzr) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/bzr.1.gz because associated file /usr/share/man/man1/brz.1.gz (of link group bzr) doesn't exist
Setting up bzr (2.7.0+bzr6622+brz) ...
Setting up mercurial (5.3.1-1ubuntu1) ...

Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
go version go1.16.2 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go/1.16.2"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/1.16.2/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.2"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="0"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2855184070=/tmp/go-build -gno-record-gcc-switches"
Removing intermediate container 66c3774de2ea
 ---> 0fd8c324fcea

@wyardley
Copy link
Author

So the issue seems to be that the new one has the user set to root rather than ubuntu? Is that final USER line for sure getting set? If I run the 1.3.0 container, it seems to have USER set to root.

% for a in 2 3 ; do echo $a ; docker run --entrypoint=/usr/bin/whoami  whitesource/renovate:1.$a.0  ; done      
2
ubuntu
3
root

Maybe this is the actual issue? Is this intentional? Do I need to explicitly set the securitycontext for the deployment?

root@renovate-pro-webhook-55c97f88cb-5zlsv:/usr/src/app# source $BASH_ENV
root@renovate-pro-webhook-55c97f88cb-5zlsv:/usr/src/app# go version
go version go1.16.2 linux/amd64
root@renovate-pro-webhook-55c97f88cb-5zlsv:/tmp/renovate/github/myorg/consumingrepo# go get -u
go: github.com/myorg/[email protected]: reading github.com/myorg/privatedep1/go.mod at revision v1.1.0: unknown revision v1.1.0

@viceice
Copy link
Collaborator

viceice commented Mar 18, 2021

@rarkins did you miss the last user 1000 line in on premises? 😶

@rarkins
Copy link
Member

rarkins commented Mar 18, 2021

❯ git diff
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
modified: Dockerfile
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@ Dockerfile:125 @ CMD [ "node", "src/server.js" ]

EXPOSE 8080

USER $UBUNTU_ID
USER $USER_ID

:(

@rarkins
Copy link
Member

rarkins commented Mar 18, 2021

I've pushed that change again to Docker Hub and hope that fixes it. Thanks for everyone's help

@wyardley
Copy link
Author

Thanks!

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

No branches or pull requests

3 participants