Skip to content

Add retry to running demo projects for macOs platforms in CI #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2025

Conversation

Yarwin
Copy link
Contributor

@Yarwin Yarwin commented Jul 12, 2025

What does this PR solve?

Stops running examples on macOS platforms which fail semi-randomly for unknown reason, see: #12. We weren't able to find the cause for two months.

What was the problem extacly?

Our examples run sometimes do fail with an libc++abi: Pure virtual function called! error. Nobody knows what extacly causes it, thus the band-aids.

outdated description

What does this PR solve?

In practice, nothing, it just piles more workarounds on top of each other. According to the latest godot poll https://docs.google.com/forms/d/e/1FAIpQLScKWGJoLEeNW1qrsDfZRfk7gHultapacH5ZhQmo9XRZADW1IQ/viewanalytics 30% of all the Mac users are still using intel CPUs (see question: What type of Mac do you use? (Optional: only if you are using Mac)) so removing it completely from the pipeline would be way too silly.

This PR introduces new variable in run matrix - failable - which tries to run example three times. Additionally continue-on-error should make whole pipeline pass even if failable job fails. Better than nothing, eh?

image

@Yarwin Yarwin added the tooling CI, build system and other infrastructure label Jul 12, 2025
@Yarwin
Copy link
Contributor Author

Yarwin commented Jul 12, 2025

huh, that's new - MacOS ARM (NOT x86) failed with the same error 🤔

@Bromeon
Copy link
Member

Bromeon commented Jul 12, 2025

So, does retrying fix the issue or not?

If failing the job doesn't contribute to the CI failing, that makes the job rather meaningless -- sure, people can manually check the result, but then what's the cause of action? How to decide if it's a "real" or "irrelevant" failure?

Are there maybe other ways we could automate this?

@Bromeon
Copy link
Member

Bromeon commented Jul 12, 2025

Btw, I brought this up in RocketChat a while ago. Unfortunately no answer. Might be worth trying again? 🤔

@Yarwin
Copy link
Contributor Author

Yarwin commented Jul 12, 2025

So, does retrying fix the issue or not?

If failing the job doesn't contribute to the CI failing, that makes the job rather meaningless -- sure, people can manually check the result, but then what's the cause of action? How to decide if it's a "real" or "irrelevant" failure?

Are there maybe other ways we could automate this?

That makes sense – I checked it in isolation few times and concluded that RETRY it is reliable enough to leave it be, but really serves no real purpose – and I'm pretty sure that everybody will forget to actually check the runs upon failing 🤔. I think I'll just disable the last step for macOS builds for now.

Btw, I brought this up in RocketChat a while ago. Unfortunately no answer. Might be worth trying again? 🤔

I re-forwarded given message and noted that it happens for macOS-ARM as well 👍

@Yarwin Yarwin force-pushed the allow-macos-pipeline-to-fail branch from 78e7f5b to d44a54d Compare July 12, 2025 16:06
@Yarwin Yarwin changed the title Allow macOS example-run job to fail without invalidating the whole action. Don't run demo examples on macOS platforms Jul 12, 2025
@Bromeon
Copy link
Member

Bromeon commented Jul 12, 2025

That makes sense – I checked it in isolation few times and concluded that RETRY it is reliable enough to leave it be, but really serves no real purpose – and I'm pretty sure that everybody will forget to actually check the runs upon failing 🤔. I think I'll just disable the last step for macOS builds for now.

Not sure I understand this right, if RETRY is reliable enough, we can leave that for now?

At least, CI would still fail in case of systematic errors (which is what we want) 🤔

@Yarwin Yarwin force-pushed the allow-macos-pipeline-to-fail branch from d44a54d to 43868d5 Compare July 13, 2025 08:24
@Yarwin Yarwin changed the title Don't run demo examples on macOS platforms Add retry to running demo projects for macOs platforms in CI Jul 13, 2025
@Yarwin
Copy link
Contributor Author

Yarwin commented Jul 13, 2025

Not sure I understand this right, if RETRY is reliable enough, we can leave that for now?

I checked it in isolation few times and it seems to work reliably (outside the fact that it initially did not fail 😅 – I added exit to handle that, let me know if it is the best/good solution).

I think we can use retry for now; if macOS jobs fail at least once then we should move to only compiling against given platform 🤔.

Copy link
Member

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

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

I think it's good, thanks! 👍 minor suggestion

Comment on lines 230 to 241
if [[ $RETRY == "true" ]]; then
# MacOS – retry running demo projects several times on fail.
echo "Running examples with retry"
RUN="./.github/other/retry.sh ./.github/other/check-example.sh"
else
RUN="./.github/other/check-example.sh"
fi
# List all folders in current directory. Don't quote $files variable.
for demo in $files; do
# Strip trailing '/' from folder name.
./.github/other/check-example.sh "${demo%/}"
$RUN "${demo%/}"
done
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [[ $RETRY == "true" ]]; then
# MacOS – retry running demo projects several times on fail.
echo "Running examples with retry"
RUN="./.github/other/retry.sh ./.github/other/check-example.sh"
else
RUN="./.github/other/check-example.sh"
fi
# List all folders in current directory. Don't quote $files variable.
for demo in $files; do
# Strip trailing '/' from folder name.
./.github/other/check-example.sh "${demo%/}"
$RUN "${demo%/}"
done
if [[ $RETRY == "true" ]]; then
# macOS – retry running demo projects several times on fail.
echo "Running examples with retry"
RETRY_CMD="./.github/other/retry.sh"
else
RETRY_CMD=""
fi
# List all folders in current directory. Don't quote $files variable.
for demo in $files; do
# Strip trailing '/' from folder name.
$RETRY_CMD ./.github/other/check-example.sh "${demo%/}"
done

The else branch might not even necessary, usually undefined env vars evaluate to "". But it's a bit more explicit.

@Yarwin Yarwin force-pushed the allow-macos-pipeline-to-fail branch from 43868d5 to 8ab3390 Compare July 13, 2025 08:38
@Yarwin Yarwin force-pushed the allow-macos-pipeline-to-fail branch from 8ab3390 to 7d8c2ff Compare July 13, 2025 08:52
@Bromeon Bromeon added this pull request to the merge queue Jul 13, 2025
Merged via the queue into godot-rust:master with commit 9924b46 Jul 13, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling CI, build system and other infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants