Running `gdk install` in a directory that is ~93 characters long fails when PostgreSQL attempts to create a UNIX socket
Overview
Running gdk install
in a directory that is ~93 characters long fails when PostgreSQL attempts to create a UNIX socket:
$ gdk install
--snip--
--------------------------------------------------------------------------------
Installing gitlab-org/gitaly Ruby gems
--------------------------------------------------------------------------------
ok: run: /private/tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/gitlab-development-kit/services/postgresql: (pid 17111) 0s, normally down
ok: run: /private/tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/gitlab-development-kit/services/redis: (pid 17112) 0s, normally down
ERROR: psql: error: Unix-domain socket path "/private/tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/gitlab-development-kit/postgresql/.s.PGSQL.5432" is too long (maximum 103 bytes)
postgres not ready
make[1]: *** [postgresql-seed-praefect] Error 1
make: *** [gitaly-update-timed] Error 2
❌️ ERROR: Failed to install.
-------------------------------------------------------
You can try the following that may be of assistance:
- Run 'gdk doctor'.
- Visit the troubleshooting documentation:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/troubleshooting/index.md.
- Visit https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues to
see if there are known issues.
- Run 'gdk reset-data' if appropriate.
- Run 'gdk pristine' which will restore your GDK to a pristine state.
-------------------------------------------------------
Steps to replicate
mkdir -p /tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890
cd /tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890
git clone git@gitlab.com:gitlab-org/gitlab-development-kit.git
cd gitlab-development-kit
make bootstrap
gdk install
Proposal
Check directory length as part of pre-flight checks and bail early if current working directory is too long.