Skip to content

GDK update failed because homebrew failed

Overview

GDK update has failed because homebrew bundle install/update failed.

I see this is not intentional, and we should try to continue even when that fails. The use of a hard failures should always be the exception, not the norm. Fixing homebrew can be done in parallel or after other tasks run. It can also be the case that you may encounter some homebrew issues that you overcome by manually installing/updating the dependency yourself, if we put that as a hard failure we put ourselves in firefight mode whenever those happen.

Impacted categories

The following categories relate to this issue:

Steps to replicate (optional)

I've run gdk update and got he following output:

gdk update                                                                                                                                                                                                                                                      1481ms  15:41:53 
ℹ️  gdk update: before hook -> support/exec-cd gitlab bin/spring stop || true
Spring is not running

--------------------------------------------------------------------------------
Running self-update on GDK
--------------------------------------------------------------------------------
From gitlab.com:gitlab-org/gitlab-development-kit
 - [deleted]           (none)     -> origin/1719-brew-bundle-is-not-executed-if-asdf-opt_out-is-set-to-true
 - [deleted]           (none)     -> origin/bump-container-registry-v3-69-0
 - [deleted]           (none)     -> origin/eread/make-uncommited-changes-instructions-more-generic
 - [deleted]           (none)     -> origin/tr-service-desk-retain-config-docs
   719f5879..7bbe9b4f  main                  -> origin/main
 * [new branch]        alberts-use-gdk-hostname-for-vault -> origin/alberts-use-gdk-hostname-for-vault
 * [new branch]        alberts-vault-service -> origin/alberts-vault-service
 * [new branch]        docs-registry-tags    -> origin/docs-registry-tags
 * [new branch]        ebralitis-quarantine-test -> origin/ebralitis-quarantine-test
 * [new branch]        main-patch-be8b       -> origin/main-patch-be8b
 * [new branch]        revert-ad88bce7       -> origin/revert-ad88bce7
   1862a3f2..c9caa4f2  verify-geo-install    -> origin/verify-geo-install
Already on 'main'

--------------------------------------------------------------------------------
Running self-update on GDK
--------------------------------------------------------------------------------
Already on 'main'
INFO: Performing common preflight checks..

--------------------------------------------------------------------------------
Ensuring platform software installed
--------------------------------------------------------------------------------
INFO: Setting up 'darwin' platform..
Upgrading cmake
Upgrading coreutils
Using docutils
Using dpkg
Using exiftool
Using git
Using git-lfs
Upgrading gitleaks
Using gnupg
Upgrading gpgme
Using graphicsmagick
Using heimdal
Using icu4c
Using libiconv
Using libssh2
Using openssl@1.1
Using pkg-config
Using re2
Using runit
Upgrading sqlite
==> Upgrading 1 outdated package:
sqlite 3.41.1 -> 3.41.2
==> Fetching sqlite
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/manifests/3.41.2
==> Downloading https://ghcr.io/v2/homebrew/core/sqlite/blobs/sha256:2a77f2ddcf124d8704c299572c4dc55517996d796011545852e362c6e2a2a2ea
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:2a77f2ddcf124d8704c299572c4dc55517996d796011545852e362c6e2a2a2ea?se=2023-03-29T13%3A50%3A00Z&sig=pcd0wDqieTI0yafvFFNGOYlG%2B%2FQyzX0FLl5G%2Ff8OH9U%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Upgrading sqlite
  3.41.1 -> 3.41.2 
==> Pouring sqlite--3.41.2.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/sqlite/3.41.2: 11 files, 4.5MB
==> Running `brew cleanup sqlite`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /opt/homebrew/Cellar/sqlite/3.41.1... (11 files, 4.5MB)
Removing: /Users/brodock/Library/Caches/Homebrew/sqlite--3.41.1... (2MB)
==> Upgrading 4 dependents of upgraded formula:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
awscli 2.11.2 -> 2.11.6, checkov 2.3.75 -> 2.3.120, gobject-introspection 1.74.0 -> 1.76.1, yamllint 1.29.0 -> 1.30.0
==> Fetching dependencies for awscli: xz and pycparser
==> Fetching xz
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.4.2
Error: No such file or directory @ dir_s_rmdir - /opt/homebrew/var/homebrew/locks/a3e9156f769d3e7b84fa810d0f9f2f3fdf3280dea14e1e46231ce3d3f92d5960--xz-5.4.2.bottle_manifest.json.incomplete.lock
Upgrading sqlite has failed!
Using vale
Using vault
Upgrading yamllint
==> Upgrading 1 outdated package:
yamllint 1.29.0 -> 1.30.0
==> Fetching dependencies for yamllint: xz
==> Fetching xz
==> Downloading https://ghcr.io/v2/homebrew/core/xz/manifests/5.4.2
Already downloaded: /Users/brodock/Library/Caches/Homebrew/downloads/a3e9156f769d3e7b84fa810d0f9f2f3fdf3280dea14e1e46231ce3d3f92d5960--xz-5.4.2.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/xz/blobs/sha256:5919a39bb56458a164ec5b757b0cb903c2d167e4e593daf8360a55db1db85d4f
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5919a39bb56458a164ec5b757b0cb903c2d167e4e593daf8360a55db1db85d4f?se=2023-03-29T13%3A50%3A00Z&sig=A5T%2FE1Xhhg0ENJLfgRlL0EMcxhB9aJ2rAukutydqkpk%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching yamllint
==> Downloading https://ghcr.io/v2/homebrew/core/yamllint/manifests/1.30.0
==> Downloading https://ghcr.io/v2/homebrew/core/yamllint/blobs/sha256:a9e48760cd61aa821b263077fb123ec5883b204006e4465e0e9498b314c70f4c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a9e48760cd61aa821b263077fb123ec5883b204006e4465e0e9498b314c70f4c?se=2023-03-29T13%3A50%3A00Z&sig=HtqHtrFFW%2FaGRW6Tj%2Fovl%2BZFNZPLOBkg0hNk0uei%2FCo%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Upgrading yamllint
  1.29.0 -> 1.30.0 
==> Installing dependencies for yamllint: xz
==> Installing yamllint dependency: xz
==> Pouring xz--5.4.2.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/xz/5.4.2: 162 files, 2.5MB
==> Installing yamllint
==> Pouring yamllint--1.30.0.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/yamllint/1.30.0: 821 files, 10.7MB
==> Running `brew cleanup yamllint`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /opt/homebrew/Cellar/yamllint/1.29.0... (821 files, 10.6MB)
Removing: /Users/brodock/Library/Caches/Homebrew/yamllint--1.29.0... (2.9MB)
==> Upgrading 5 dependents of upgraded formulae:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
awscli 2.11.2 -> 2.11.6, bazel 6.1.0 -> 6.1.1, checkov 2.3.75 -> 2.3.120, gobject-introspection 1.74.0 -> 1.76.1, librsvg 2.55.1 -> 2.56.0
==> Fetching dependencies for awscli: pycparser
==> Fetching pycparser
==> Downloading https://ghcr.io/v2/homebrew/core/pycparser/manifests/2.21
==> Downloading https://ghcr.io/v2/homebrew/core/pycparser/blobs/sha256:882d005d9bcc429f3eee0d5cdb3c5065302ec25c96ea1ae3d5a32fb1f6f08cb8
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:882d005d9bcc429f3eee0d5cdb3c5065302ec25c96ea1ae3d5a32fb1f6f08cb8?se=2023-03-29T13%3A50%3A00Z&sig=N4K%2BpD5aXvFswSRWc4PZk608oH%2B9iPu0uNMoAswyCM0%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching awscli
==> Downloading https://ghcr.io/v2/homebrew/core/awscli/manifests/2.11.6
==> Downloading https://ghcr.io/v2/homebrew/core/awscli/blobs/sha256:40f08377961c42e6ceef1d8e130df382aedd9db9a52a20b01fc07386eca0130b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:40f08377961c42e6ceef1d8e130df382aedd9db9a52a20b01fc07386eca0130b?se=2023-03-29T13%3A50%3A00Z&sig=BVJUtlF2puef2EJEEoHIfxHzmitrv3ngOOcG02hHu%2BU%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching dependencies for gobject-introspection: glib
==> Fetching glib
==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.76.1
==> Downloading https://ghcr.io/v2/homebrew/core/glib/blobs/sha256:39b3f6a5913c7532cf7b9abe759573a1d75370832dbf865a5d319fda54ee9513
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:39b3f6a5913c7532cf7b9abe759573a1d75370832dbf865a5d319fda54ee9513?se=2023-03-29T13%3A50%3A00Z&sig=N%2BSntha%2BlxvGSb5O56F2tygHC%2FdVOtMRu6QKvpiMvXw%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching gobject-introspection
==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/manifests/1.76.1
==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/blobs/sha256:0893c5b8d8dc89d1649c6d72c2d2a29fbe9412a5348a5e1fb28ebc284d46332e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0893c5b8d8dc89d1649c6d72c2d2a29fbe9412a5348a5e1fb28ebc284d46332e?se=2023-03-29T13%3A50%3A00Z&sig=vJab6ZZ8oF4r7xOGM71lywdDJTHDgY5vORbFiQ9rLvM%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching bazel
==> Downloading https://ghcr.io/v2/homebrew/core/bazel/manifests/6.1.1
==> Downloading https://ghcr.io/v2/homebrew/core/bazel/blobs/sha256:d8171aa5399973ed34c96cae7ea923919c444db425fcfbf3f9b7a5d62d1b5dbc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d8171aa5399973ed34c96cae7ea923919c444db425fcfbf3f9b7a5d62d1b5dbc?se=2023-03-29T13%3A50%3A00Z&sig=gAxfy9j2Smnyf4u5yWrvt5Mii68TO7kds8sfWc4YJYA%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching checkov
==> Downloading https://ghcr.io/v2/homebrew/core/checkov/manifests/2.3.120
==> Downloading https://ghcr.io/v2/homebrew/core/checkov/blobs/sha256:5d5c3636ca6660ee80c8b34ca52d7be69138fdace351718b47de375b13e94781
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5d5c3636ca6660ee80c8b34ca52d7be69138fdace351718b47de375b13e94781?se=2023-03-29T13%3A50%3A00Z&sig=Qh096wczXZXJxIXFA7ipqbYmIt2EP2Y3WBuZ75nae9U%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Fetching librsvg
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.56.0
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/blobs/sha256:91da9830a592678197dfc088ebdc5da8024bcf0fddfc51d9dd4d2dbd96a7d265
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:91da9830a592678197dfc088ebdc5da8024bcf0fddfc51d9dd4d2dbd96a7d265?se=2023-03-29T13%3A50%3A00Z&sig=cLUWaSg8F%2Fa5N7FpctB9WIeHrXZUtvy2KYzuuBv%2BUqA%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Upgrading awscli
  2.11.2 -> 2.11.6 
==> Installing dependencies for awscli: pycparser
==> Installing awscli dependency: pycparser
==> Pouring pycparser--2.21.all.bottle.tar.gz
🍺  /opt/homebrew/Cellar/pycparser/2.21: 46 files, 656.6KB
==> Installing awscli
==> Pouring awscli--2.11.6.arm64_ventura.bottle.tar.gz
==> Caveats
The "examples" directory has been installed to:
  /opt/homebrew/share/awscli/examples
==> Summary
🍺  /opt/homebrew/Cellar/awscli/2.11.6: 13,206 files, 116.7MB
==> Running `brew cleanup awscli`...
Removing: /opt/homebrew/Cellar/awscli/2.11.2... (13,226 files, 116.7MB)
Removing: /Users/brodock/Library/Caches/Homebrew/awscli--2.11.2... (19.4MB)
==> Upgrading gobject-introspection
  1.74.0 -> 1.76.1 
==> Installing dependencies for gobject-introspection: glib
==> Installing gobject-introspection dependency: glib
==> Pouring glib--2.76.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/glib/2.76.1: 455 files, 22.2MB
==> Installing gobject-introspection
==> Pouring gobject-introspection--1.76.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/gobject-introspection/1.76.1: 193 files, 13.4MB
==> Running `brew cleanup gobject-introspection`...
Removing: /opt/homebrew/Cellar/gobject-introspection/1.74.0... (193 files, 13.2MB)
==> Upgrading bazel
  6.1.0 -> 6.1.1 
==> Pouring bazel--6.1.1.arm64_monterey.bottle.tar.gz
==> Caveats
fish completions have been installed to:
  /opt/homebrew/share/fish/vendor_completions.d
==> Summary
🍺  /opt/homebrew/Cellar/bazel/6.1.1: 10 files, 34.4MB
==> Running `brew cleanup bazel`...
Removing: /opt/homebrew/Cellar/bazel/6.1.0... (10 files, 34.4MB)
Removing: /Users/brodock/Library/Caches/Homebrew/bazel--6.1.0... (28.5MB)
==> Upgrading checkov
  2.3.75 -> 2.3.120 
==> Pouring checkov--2.3.120.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/checkov/2.3.120: 7,387 files, 166.0MB
==> Running `brew cleanup checkov`...
Removing: /opt/homebrew/Cellar/checkov/2.3.75... (7,336 files, 165.4MB)
Removing: /Users/brodock/Library/Caches/Homebrew/checkov--2.3.75... (24.4MB)
==> Upgrading librsvg
  2.55.1 -> 2.56.0 
==> Pouring librsvg--2.56.0.arm64_ventura.bottle.tar.gz
==> /opt/homebrew/opt/gdk-pixbuf/bin/gdk-pixbuf-query-loaders --update-cache
🍺  /opt/homebrew/Cellar/librsvg/2.56.0: 22 files, 52.5MB
==> Running `brew cleanup librsvg`...
Removing: /opt/homebrew/Cellar/librsvg/2.55.1... (24 files, 54.5MB)
Removing: /Users/brodock/Library/Caches/Homebrew/librsvg--2.55.1... (16MB)
==> Checking for dependents of upgraded formulae...
==> Reinstalling 3 dependents with broken linkage from source:
python@3.10, python@3.11, python@3.9
==> Fetching python@3.10
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/c18a35db1a25be4c080c81cde6cdf6617392da1f/Formula/python@3.10.rb
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/python/3.10-sysconfig.diff
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/a1618a5005d0b01d63b720321806820a03432f1a/python/3.10-distutils-scheme.diff
==> Downloading https://files.pythonhosted.org/packages/5f/36/7374297692bb9dbd7569a0f84887c7e5e314c41d5d9518cb76fbb130620d/setuptools-67.2.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/b5/16/5e24bf63cff51dcc169f43bd43b86b005c49941e09cc3482a5b370db239e/pip-23.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/a2/b8/6a06ff0f13a00fc3c3e7d222a995526cbca26c1ad107691b6b1badbbabf1/wheel-0.38.4.tar.gz
==> Downloading https://www.python.org/ftp/python/3.10.10/Python-3.10.10.tgz
==> Reinstalling python@3.10 
Error: An exception occurred within a child process:
  RuntimeError: /opt/homebrew/opt/sqlite not present or broken
Please reinstall sqlite. Sorry :(
Upgrading yamllint has failed!
Using chromedriver
Homebrew Bundle failed! 2 Brewfile dependencies failed to install.
Check for differences in your Brewfile.lock.json!

ERROR: Failed to install platform software.
make[1]: *** [platform-update-run] Error 1
make: *** [platform-update-timed] Error 2
❌️ ERROR: Failed to update.
-------------------------------------------------------
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.
-------------------------------------------------------

Proposal (optional)

Move the task to a rake task (we shouldn't be adding more Makefile tasks), and handle failure situation in ruby code, save the relevant output and present to the user at the end with a list of failures.

Environment (optional)

  • Operating system name: Darwin ... 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64
  • Architecture: arm64
  • The contents of your gdk.yml (if any)
  • Ruby version: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [arm64-darwin22]
  • GDK version: GitLab Development Kit 0.2.16 (7bbe9b4f)
Edited by Gabriel Mazetto