Skip to content

Infrastructure: add retries to brew install to handle hangs#9045

Merged
vadi2 merged 8 commits intoMudlet:developmentfrom
vadi2:fix-macos-brew-timeout
Mar 16, 2026
Merged

Infrastructure: add retries to brew install to handle hangs#9045
vadi2 merged 8 commits intoMudlet:developmentfrom
vadi2:fix-macos-brew-timeout

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Mar 13, 2026

Brief overview of PR changes/additions

macOS builds are still hanging, so let's add retries to them in hope that'll bring more resiliency.

Motivation for adding to Mudlet

CI builds we can rely on to work.

Other info (issues closed, discussion etc)

@vadi2 vadi2 requested a review from a team as a code owner March 13, 2026 14:27
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Mar 13, 2026

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

Comment thread .github/workflows/build-mudlet-pr.yml Outdated
brew install libzzip libzip ccache expect assimp hunspell pcre2 pugixml sqlite yajl boost
# brew install can hang indefinitely during bottle pouring, so timeout and retry
for attempt in 1 2 3; do
if timeout 120 brew install libzzip libzip ccache expect assimp hunspell pcre2 pugixml sqlite yajl boost; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we can add --verbose to the install command? It seems to hang just after fetching everything, but we've no idea as to why. Maybe some extra information from verbose will enlighten us?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, added

@missionz3r0
Copy link
Copy Markdown
Contributor

@vadi2 Also, seems timeout isn't a command on macos.

image

@missionz3r0
Copy link
Copy Markdown
Contributor

missionz3r0 commented Mar 13, 2026

@vadi2 And, looks like gtimeout isn't there either.

image

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Mar 13, 2026

Warning: brew install attempt 1 failed or timed out, retrying...

Looks like that worked

@missionz3r0
Copy link
Copy Markdown
Contributor

missionz3r0 commented Mar 13, 2026

I would of left the --verbose flag. But, I think I see what was causing the problem.

Here's from one of the prior runs with verbose on:
image

And here's the one that failed:
image

Looks like boost's post install doesn't work sometimes?

@missionz3r0
Copy link
Copy Markdown
Contributor

I would of left the --verbose flag. But, I think I see what was causing the problem.

Here's from one of the prior runs with verbose on: image

And here's the one that failed: image

Looks like boost's post install doesn't work sometimes?

No nevermind, I think the output from --verbose just made things take too long as the system tried to keep up with all the output.

for attempt in 1 2 3; do
brew install libzzip libzip ccache expect assimp hunspell pcre2 pugixml sqlite yajl boost &
brew_pid=$!
( sleep 120 && kill $brew_pid 2>/dev/null ) &
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are waiting for 2 minutes (120 seconds) for the brew install to complete and allowing 10 minutes overall for 3 tries = 2 x 3 = 6 minutes - so isn't there time for 4 tries (if not 5)? 😀

@vadi2 vadi2 merged commit fff21e8 into Mudlet:development Mar 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants