Skip to content

Fix spurious failures for macos packages#901

Merged
psavery merged 2 commits intomasterfrom
fix-macos-package-spurious-failures
Mar 3, 2026
Merged

Fix spurious failures for macos packages#901
psavery merged 2 commits intomasterfrom
fix-macos-package-spurious-failures

Conversation

@psavery
Copy link
Copy Markdown
Collaborator

@psavery psavery commented Feb 27, 2026

Overview

Sometimes, between fetching an index and downloading the actual package, there's an update to a package, which causes a checksum mismatch. This has been causing macos build failures.

Clearing the package cache before conda build helps prevent this failure from happening. We also add retry logic so that if the upstream race condition occurs during the actual build, it will hopefully succeed the next time.

I think it is mainly happening for mac because we include a cross-compile, and thus build 10 packages in one CI run. I think conda build caches the hashsum values early on in the process, and if the packages get updated upstream during the 10 builds, the hashsum no longer matches and it fails.

Affected Workflows

None

Documentation Changes

None

Sometimes, between fetching an index and downloading the actual
package, there's an update to a package, which causes a checksum
mismatch. This has been causing macos build failures.

Clearing the package cache before `conda build` helps prevent this
failure from happening. We also add retry logic so that if the
upstream race condition occurs during the actual build, it will
hopefully succeed the next time.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery
Copy link
Copy Markdown
Collaborator Author

psavery commented Feb 27, 2026

I'm gonna try running the CI 3 times to verify the spurious error doesn't happen again, at least in this PR. It's running the first time now.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.41%. Comparing base (f40f031) to head (8123db2).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #901   +/-   ##
=======================================
  Coverage   69.41%   69.41%           
=======================================
  Files         148      148           
  Lines       22590    22590           
=======================================
  Hits        15680    15680           
  Misses       6910     6910           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@psavery psavery requested a review from bnmajor February 27, 2026 18:37
@psavery
Copy link
Copy Markdown
Collaborator Author

psavery commented Feb 27, 2026

Strangely, the code coverage is reduced, even though only CI code was modified 🙂

@psavery
Copy link
Copy Markdown
Collaborator Author

psavery commented Feb 27, 2026

First time passed. Rerunning.

@psavery
Copy link
Copy Markdown
Collaborator Author

psavery commented Feb 27, 2026

Second time passed. It succeeded during its second attempt (first attempt had the error).

This will *really* ensure it won't fail.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery psavery requested a review from ZackAttack614 March 3, 2026 19:06
Copy link
Copy Markdown
Collaborator

@ZackAttack614 ZackAttack614 left a comment

Choose a reason for hiding this comment

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

This is an improvement, but I hope we can figure out how to resolve the core of the issue soon.

@psavery psavery merged commit da64782 into master Mar 3, 2026
15 of 16 checks passed
@psavery psavery deleted the fix-macos-package-spurious-failures branch March 3, 2026 19:15
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.

2 participants