LibPQ.jl icon indicating copy to clipboard operation
LibPQ.jl copied to clipboard

Make CI job more resilient to `brew update` failure

Open omus opened this issue 5 years ago • 2 comments
trafficstars

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
[0K[31;1mThe command "brew update" failed and exited with 1 during .[0m

Your build has been stopped.

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

omus avatar Oct 09 '20 16:10 omus

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.

iamed2 avatar Oct 09 '20 17:10 iamed2

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

omus avatar Oct 10 '20 02:10 omus