JuliaDatabases / LibPQ.jl

A Julia wrapper for libpq
MIT License
217 stars 51 forks source link

Make CI job more resilient to `brew update` failure #201

Open omus opened 3 years ago

omus commented 3 years ago

Using brew update can sometimes result in CI failures:

$ brew update
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': transfer closed with outstanding read data remaining
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz

#################                                                         24.6%
###################################                                       49.0%
####################################################                      73.4%
#######################################################################   98.8%
######################################################################## 100.0%
==> Pouring portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
Updated 1 tap (homebrew/cask).
==> New Casks
8bitdo-ultimate-software
8x8-meet
accurics
ace-link
...
xmrouter
yabumi
yourkit-java-profiler
youview
==> java has been moved to Homebrew.
To uninstall the cask run:
  brew cask uninstall --force java
==> Installing java...
Error: No available formula or cask with the name "homebrew/core/java".
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
Error: No similarly named formulae found.
==> Searching for similarly named formulae...
travis_time:end:0008115a:start=1602197035170524000,finish=1602197354048535000,duration=318878011000,event=before_install
The command "brew update" failed and exited with 1 during .

Your build has been stopped.

https://travis-ci.com/github/invenia/LibPQ.jl/jobs/397184208

iamed2 commented 3 years ago

Is there anything we use on our internal macOS runners that you can suggest here? My only thought is just retrying that line on failure.

omus commented 3 years ago

That seems like a good option. Something else that comes to mind is that the brew update call doesn't look strictly necessary. Maybe making the update optional works in this case? e.g. brew update || true