CI: "sudo chown" fails 1/2 of the time
Out of 4000 jobs in the last two weeks that try to run sudo chown ghc:ghc -R .
, 2000 do this:
Using docker image sha256:ddeb1cdee441a8e30bc0ad13133a2354868b90fb539aea3ba803581922a686ad for registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:cf2ba8e205bd41ac36f39
e1a12b4727f899ded75 with digest registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10@sha256:9db545cf9762e90fb250c2c7d630872afec7a643cfd94ab3343eca88e7570642 ...
$ export PATH="/opt/toolchain/bin:$PATH"
$ sudo chown ghc:ghc -R .
sudo: unable to resolve host runner-yxv6wykw-project-1-concurrent-0: Name or service not known
$ .gitlab/ci.sh setup
Using locale C.UTF-8...
GitLab has a few open issues about some networking race condition at the beginning of a job, e.g. https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27335 and https://gitlab.com/gitlab-org/gitlab-runner/-/issues/6644. Maybe related, since this chown is happening as the first step in a newly-started container.
At any rate, if it fails 50% of the time with no ill effect, maybe we don't need it.